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-4 of 4 results.

A305985 Filter sequence combining from all divisors d > 1 of n, the prime signature of 2d+1.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jun 15 2018

Keywords

Comments

Restricted growth sequence transform of A305984.
For all i, j: a(i) = a(j) => A086668(i) = A086668(j).

Crossrefs

Programs

  • PARI
    up_to = 65537;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A305984(n) = { my(m=1); fordiv(n, d, if((d>1), m *= prime(A305973(1+d)-1))); (m); }; \\ Needs also code from A305973.
    v305985 = rgs_transform(vector(up_to,n,A305984(n)));
    A305985(n) = v305985[n];

A305978 Filter sequence combining prime signatures of n and 2n+1.

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 5, 6, 7, 8, 2, 9, 10, 4, 4, 11, 5, 12, 5, 12, 4, 13, 2, 14, 15, 4, 16, 17, 2, 18, 19, 20, 4, 8, 4, 21, 19, 8, 4, 22, 2, 23, 5, 12, 17, 8, 5, 24, 25, 12, 4, 26, 2, 27, 8, 27, 8, 13, 5, 28, 5, 29, 12, 30, 4, 23, 31, 12, 4, 23, 5, 32, 19, 4, 12, 33, 8, 18, 5, 34, 35, 36, 2, 28, 13, 4, 13, 37, 2, 38, 8, 17, 8, 39, 4, 40, 41, 12, 12, 42, 5, 23
Offset: 1

Views

Author

Antti Karttunen, Jun 15 2018

Keywords

Comments

Restricted growth sequence transform of A286258.

Crossrefs

Cf. A005384 (positions of 2's), A234095 (of 5's).

Programs

  • PARI
    up_to = 65537;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
    Aux305978(n) = [A046523(n),A046523(n+n+1)];
    v305978 = rgs_transform(vector(up_to,n,Aux305978(n)));
    A305978(n) = v305978[n];

A319706 Filter sequence which for primes p records the prime signature of 2p+1, and for all other numbers assigns a unique number.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Sep 26 2018

Keywords

Comments

Restricted growth sequence transform of function f defined as f(n) = A046523(2n+1) when n is a prime, otherwise -n.
For all i, j:
A305810(i) = A305810(j) => a(i) = a(j),
and
a(i) = a(j) => A305800(i) = A305800(j),
a(i) = a(j) => A305978(i) = A305978(j),
a(i) = a(j) => A305985(i) = A305985(j).

Crossrefs

Cf. A005384 (positions of 2's), A234095 (positions of 5's).

Programs

  • PARI
    up_to = 100000;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    A319706aux(n) = if(isprime(n),A046523(n+n+1),-n);
    v319706 = rgs_transform(vector(up_to,n,A319706aux(n)));
    A319706(n) = v319706[n];

A305894 Filter sequence for a(Sophie Germain primes) = constant sequences.

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 5, 6, 7, 8, 2, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 20, 21, 22, 23, 24, 2, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 2, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 2, 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, 2, 76, 77, 78, 79, 80, 2, 81
Offset: 1

Views

Author

Antti Karttunen, Jul 01 2018

Keywords

Comments

For all i, j:
a(i) = a(j) => A305800(i) = A305800(j),
a(i) = a(j) => A305978(i) = A305978(j).

Crossrefs

Programs

  • PARI
    up_to = 100000;
    A156660(n) = (isprime(n)&&isprime(2*n+1)); \\ From A156660
    partialsums(f,up_to) = { my(v = vector(up_to), s=0); for(i=1,up_to,s += f(i); v[i] = s); (v); }
    v156874 = partialsums(A156660, up_to);
    A156874(n) = v156874[n];
    A305894(n) = if(n<2,n,if(A156660(n),2,1+n-A156874(n)));

Formula

a(1) = 1; for n > 1, a(n) = 2 if A156660(n) == 1 [when n is in A005384 = 2, 3, 5, 11, 23, 29, 41, 53, 83, 89, 113, ...], otherwise a(n) = 1+n-A156874(n).
Showing 1-4 of 4 results.