login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A257012 Number of sequences of positive integers with length 5 and alternant equal to n. 3
0, 0, 1, 2, 3, 5, 5, 10, 8, 11, 11, 19, 15, 19, 17, 27, 17, 36, 17, 43, 27, 29, 31, 54, 30, 41, 45, 63, 29, 57, 33, 75, 49, 59, 47, 96, 39, 79, 57, 84, 61, 81, 49, 97, 81, 85, 47, 150, 64, 105, 75, 101, 69, 123, 77, 141, 81, 103, 71, 189, 75, 119, 121, 137, 82, 143, 85, 183, 101, 129, 93, 211, 89, 129, 131, 187, 116, 201 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
See A257009 for the definition of the alternant of a sequence. The number of sequences of length 1 with given alternant value n is 1, while the number of sequences of length 2 with given alternant value n is d(n), the number of divisors of n (see A000005).
LINKS
B. R. Smith, Reducing quadratic forms by kneading sequences J. Int. Seq., 17 (2014) 14.11.8.
EXAMPLE
The a(7) = 3 sequences with length 5 and alternant 7 are (1,1,1,3,1), (1,2,1,2,1), and (1,3,1,1,1).
MATHEMATICA
Length5Q[x_, y_] :=
Module[{l = ContinuedFraction[(x[[2]] + 2*x[[1]] + y)/(2*x[[1]])]},
If[OddQ[Length[l]], Return[Length[l] == 5],
If[Last[l] == 1, Return[Length[l] - 1 == 5], Return[Length[l] + 1 == 5]]]];
Table[Length[
Select[Flatten[
Select[
Table[{a, k}, {k,
Select[Range[Ceiling[-Sqrt[n^2 - 4]], Floor[Sqrt[n^2 - 4]]],
Mod[# - n^2 + 4, 2] == 0 &]}, {a,
Select[Divisors[(n^2 - 4 - k^2)/4], # > (Sqrt[n^2 - 4] - k)/2 &]}],
UnsameQ[#, {}] &], 1], Length5Q[#, n] &]], {n, 3, 80}]
CROSSREFS
Sequence in context: A257008 A338750 A265822 * A325412 A265562 A140312
KEYWORD
nonn
AUTHOR
Barry R. Smith, Apr 19 2015
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 5 17:32 EDT 2024. Contains 372277 sequences. (Running on oeis4.)