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

A319704 Filter sequence which records for primes their residue modulo 4, and for all other numbers assigns a unique number.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Sep 26 2018

Keywords

Comments

Restricted growth sequence transform of function f defined as f(n) = A010873(n) when n is a prime, otherwise -n.
For all i, j:
a(i) = a(j) => A010873(i) = A010873(j),
a(i) = a(j) => A305801(i) = A305801(j),
a(i) = a(j) => A319714(i) = A319714(j).

Crossrefs

Cf. A002145 (positions of 3's), A002144 (positions of 5's).
Cf. also A319350, A319705, A319706.

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; };
    A319704aux(n) = if(isprime(n),-(n%4),n);
    v319704 = rgs_transform(vector(up_to,n,A319704aux(n)));
    A319704(n) = v319704[n];

A319350 Filter sequence which records the number of cyclotomic cosets of 2 mod p for odd primes p, and for any other number assigns a unique number.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Sep 26 2018

Keywords

Comments

Restricted growth sequence transform of function f defined as f(n) = A006694((n-1)/2) when n is an odd prime, otherwise -n.
For all i, j:
a(i) = a(j) => A305801(i) = A305801(j),
a(i) = a(j) => A319351(i) = A319351(j).

Examples

			a(3) = a(5) = a(11) = a(13) = a(19) = a(29) = a(37) because 3, 5, 11, 13, 19, 29, 37 are primes p for which A006694((p-1)/2) = 1 (are in A001122).
a(7) = a(17) = a(23) = a(41) = a(47) because 7, 17, 23, 41, 47 are primes p for which A006694((p-1)/2) = 2 (are in A115591).
		

Crossrefs

Cf. A001122 (positions of 3's), A115591 (positions of 6's).
Cf. also A319704, A319705, A319706.

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; };
    A319350aux(n) = if((n<=2)||!isprime(n),n,-((n-1)/znorder(Mod(2, n))));
    v319350 = rgs_transform(vector(up_to,n,A319350aux(n)));
    A319350(n) = v319350[n];

A319705 Filter sequence which for primes p records a distinct value for each distinct multiset formed from the lengths of 1-runs in its binary representation [A286622(p)], and for all other numbers assigns a unique number.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Sep 26 2018

Keywords

Comments

Restricted growth sequence transform of function f defined as f(n) = A278222(n) when n is a prime, otherwise -n.
After its initial term 3, Fermat primes (A019434) gives the positions of 5 in this sequence, while the Mersenne primes (A000668) are each assigned to their own singleton equivalence class.
For all i, j:
a(i) = a(j) => A305900(i) = A305900(j),
a(i) = a(j) => A286622(i) = A286622(j),
a(i) = a(j) => A305795(i) = A305795(j).

Crossrefs

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; };
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t };
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    A278222(n) = A046523(A005940(1+n));
    A319705aux(n) = if(isprime(n),A278222(n),-n);
    v319705 = rgs_transform(vector(up_to,n,A319705aux(n)));
    A319705(n) = v319705[n];
Showing 1-3 of 3 results.