cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A305811 Filter sequence for a(Fibonacci prime) = constant sequences.

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 5, 6, 7, 8, 9, 10, 2, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 2, 86, 87, 88, 89, 90
Offset: 1

Views

Author

Antti Karttunen, Jun 16 2018

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A305800(n), A305820(n)].
For all i, j: a(i) = a(j) => A304105(i) = A304105(j).

Crossrefs

Programs

  • PARI
    up_to = 100000;
    A010056(n) = { my(k=n^2); k+=(k+1)<<2; (issquare(k) || (n>0 && issquare(k-8))) }; \\ From A010056
    partialsums(f,up_to) = { my(v = vector(up_to), s=0); for(i=1,up_to,s += f(i); v[i] = s); (v); }
    v_partsums = partialsums(x -> (isprime(x)&&A010056(x)), up_to);
    A305811(n) = if(1==n,n,if(isprime(n)&&A010056(n),2,1+n-v_partsums[n]));

Formula

a(1) = 1; for n > 1, if A010051(n)==1 and A010056(n)==1 [when n is a Fibonacci prime, A005478], a(n) = 2, otherwise a(n) = running count from 3 onward.