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!)
A268133 If a(n) is not a square, then a(n+1) = a(n) + a(n-1), else a(n+1) is the smallest positive integer not occurring earlier. 1
1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 4, 6, 10, 16, 7, 23, 30, 53, 83, 136, 219, 355, 574, 929, 1503, 2432, 3935, 6367, 10302, 16669, 26971, 43640, 70611, 114251, 184862, 299113, 483975, 783088, 1267063, 2050151, 3317214, 5367365, 8684579, 14051944, 22736523, 36788467, 59524990, 96313457, 155838447, 252151904 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
A variant of the sequence A267758 where the relation has to hold for prime numbers rather than for nonsquares. The sequence starts like the Fibonacci sequence up to 144, then restarts with 4 up to 16, then it restarts from 7 and grows very large.
LINKS
FORMULA
Empirical g.f.: (1+x-229*x^11-142*x^12-19*x^15) / (1-x-x^2). - Colin Barker, Jan 27 2016
PROG
(PARI) {a(n, show=0, is=x->issquare(x), a=[1], L=0, U=[])->while(#a<n, show&&if(type(show)=="t_STR", write(show, #a, " ", a[#a]), print1(a[#a]", ")); if(a[#a]>L+1, U=setunion(U, [a[#a]]), L++; while(#U&&U[1]<=L+1, U=U[^1]; L++)); a=concat(a, if(is(a[#a])||#a<2, L+1, a[#a]+a[#a-1]))); if(type(show)=="t_VEC", a, a[#a])}
CROSSREFS
Sequence in context: A105471 A189722 A023441 * A217737 A023442 A000044
KEYWORD
nonn
AUTHOR
M. F. Hasler, Jan 26 2016
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 March 28 18:04 EDT 2024. Contains 371254 sequences. (Running on oeis4.)