Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A147955
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A147955 A Fernandez-type expansion for modulo six recursion:( using f[n] for f(n)); f[n] = f[f[n - 1]] + If[n < 6, f[n - f[(n - 1)]], If[Mod[n, 6] == 0, f[f[n/6]], If[Mod[1 + n, 6] == 1, f[f[(n - 1)/6]], If[Mod[2 + n, 6] == 2, f[f[(n - 2)/6]], If[Mod[3 + n, 6] == 3, f[f[(n - 3)/6]], If[Mod[4 + n, 6] == 4, f[f[(n - 4)/6]], If[Mod[5 + n, 6] == 5, f[f[(n - 5)/6]], f[n - f[(n - 1)]]]]]]]]];;p(x,n)=Product[x+f(n),{n,0,Infinity}]; a(n)=Coefficients[(p(x,n)). +0
1
1, 1, 1, 3, 4, 7, 10, 16, 24, 38, 55, 78, 114, 162, 235, 339, 471, 645, 919, 1251, 1718, 2366, 3227, 4329, 5890, 7929, 10599, 14171, 18810, 24925, 33084, 43515, 56998, 74984, 97843, 127931, 166197, 215400, 278805, 360727, 464083, 596498, 766525 (list; graph; listen)
OFFSET

0,4

COMMENT

Conway's A004001 for n below 6 and then an if ladder modulo 6 above that based on the pattern of my modulo three A147665. Ratio for the expansion is 1.2032012659622635 at n=100.

FORMULA

f[n] = f[f[n - 1]] + If[n < 6, f[n - f[(n - 1)]], If[Mod[n, 6] == 0, f[f[n/6]], If[Mod[1 + n, 6] == 1, f[f[(n - 1)/6]], If[Mod[2 + n, 6] == 2, f[f[(n - 2)/6]], If[Mod[3 + n, 6] == 3, f[f[(n - 3)/6]], If[Mod[4 + n, 6] == 4, f[f[(n - 4)/6]], If[Mod[5 + n, 6] == 5, f[f[(n - 5)/6]], f[n - f[(n - 1)]]]]]]]]]: ;p(x,n)=Product[x+f(n),{n,0,Infinity}]; a(n)=Coefficients[(p(x,n)).

MATHEMATICA

f[0] = 0; f[1] = 1; f[2] = 1; f[n_] := f[n] = f[f[n - 1]] + If[n < 6, f[n - f[(n - 1)]], If[Mod[n, 6] == 0, f[f[n/6]], If[Mod[1 + n, 6] == 1, f[f[(n - 1)/6]], If[Mod[2 + n, 6] ==2, f[f[(n - 2)/6]], If[Mod[3 + n, 6] == 3, f[f[(n - 3)/6]], If[Mod[4 + n, 6] == 4, f[f[(n - 4)/6]], If[Mod[5 + n, 6] == 5, f[f[(n - 5)/6]], f[n - f[(n - 1)]]]]]]]]]; P[x_, n_] := P[x, n] = Product[1 + f[m]*x^m, {m, 0, n}]; Length[CoefficientList[ExpandAll[P[x, 99]], x]]; a1 = CoefficientList[ExpandAll[P[x, 99]], x]; a2 = CoefficientList[ExpandAll[P[x, 100]], x]; a = Sum[If[a1[[n]] - a2[[n]] == 0, 1, 0], {n, 1, 4951}]; Table[a2[[n]], {n, 1, 100}]

CROSSREFS

A147665

Sequence in context: A147871 A004397 A047967 this_sequence A134591 A058611 A098613

Adjacent sequences: A147952 A147953 A147954 this_sequence A147956 A147957 A147958

KEYWORD

nonn

AUTHOR

Roger L. Bagula (rlbagulatftn(AT)yahoo.com), Nov 17 2008

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 18 21:37 EST 2009. Contains 171024 sequences.


AT&T Labs Research