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.

Showing 1-2 of 2 results.

A305900 Filter sequence for a(primes > 3) = constant sequences.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jun 14 2018

Keywords

Comments

For all i, j:
a(i) = a(j) => A305801(i) = A305801(j) => A305800(i) = A305800(j).
a(i) = a(j) => A007949(i) = A007949(j).
a(i) = a(j) => A305893(i) = A305893(j).

Crossrefs

Cf. also A305901, A305902, A305903 (this filter applied to various permutations of N).

Programs

  • PARI
    A305900(n) = if(n<=5,n,if(isprime(n),5,3+n-primepi(n)));

Formula

For n <= 5, a(n) = n, for >= 5, a(n) = 5 when n is a prime, and a(n) = 3+n-A000720(n) when n is a composite.

A305901 Filter sequence for all such sequences b, for which b(A006254(k)) = constant for all k >= 3.

Original entry on oeis.org

1, 2, 3, 4, 5, 4, 4, 6, 4, 4, 7, 4, 8, 9, 4, 4, 10, 11, 4, 12, 4, 4, 13, 4, 14, 15, 4, 16, 17, 4, 4, 18, 19, 4, 20, 4, 4, 21, 22, 4, 23, 4, 24, 25, 4, 26, 27, 28, 4, 29, 4, 4, 30, 4, 4, 31, 4, 32, 33, 34, 35, 36, 37, 4, 38, 4, 39, 40, 4, 4, 41, 42, 43, 44, 4, 4, 45, 46, 4, 47, 48, 4, 49, 4, 50, 51, 4, 52, 53, 4, 4, 54, 55, 56, 57, 4, 4, 58, 4, 4, 59, 60, 61
Offset: 1

Views

Author

Antti Karttunen, Jun 14 2018

Keywords

Comments

Restricted growth sequence transform of A305900(A064216(n)).
For all i, j:
a(i) = a(j) => A278223(i) = A278223(j).
a(i) = a(j) => A253786(i) = A253786(j).

Crossrefs

Cf. also A305902.

Programs

  • PARI
    up_to = 1000;
    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+x-1), up_to);
    A305901(n) = if(n<=3,n,if(isprime(n+n-1),4,3+n-v_partsums[n]));

Formula

For n <= 3, a(n) = n, and for n >= 4, a(n) = 4 if 2n-1 is a prime (for all n in A006254[3..] = 4, 6, 7, 9, 10, 12, 15, ...), and for all other n (numbers n such that 2n-1 is composite), a(n) = running count from 5 onward.
Showing 1-2 of 2 results.