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

A322805 Lexicographically earliest such sequence a that for all i, j, a(i) = a(j) => f(i) = f(j), where f(1)=0, f(2)=1, f(n)=-1 for odd primes, and f(n) = A252463(n) for any other number.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 26 2018

Keywords

Comments

For all i, j:
a(i) = a(j) => A319694(i) = A319694(j),
a(i) = a(j) => A319699(i) = A319699(j),
a(i) = a(j) => A319700(i) = A319700(j),
a(i) = a(j) => A319703(i) = A319703(j),
a(i) = a(j) => A319989(i) = A319989(j),
a(i) = a(j) => A320110(i) = A320110(j) => A320111(i) = A320111(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; };
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A252463(n) = if(!(n%2),n/2,A064989(n));
    A322805aux(n) = if(n<=2,n-1,if(isprime(n),-1,A252463(n)));
    v322805 = rgs_transform(vector(up_to,n,A322805aux(n)));
    A322805(n) = v322805[n];

A322809 Lexicographically earliest such sequence a that a(i) = a(j) => f(i) = f(j) for all i, j, where f(n) = -1 if n is an odd prime, and f(n) = floor(n/2) for all other numbers.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 26 2018

Keywords

Comments

This sequence is a restricted growth sequence transform of a function f which is defined as f(n) = A004526(n), unless n is an odd prime, in which case f(n) = -1, which is a constant not in range of A004526. See the Crossrefs section for a list of similar sequences.
For all i, j:
A305801(i) = A305801(j) => a(i) = a(j),
a(i) = a(j) => A039636(i) = A039636(j).
For all i, j: a(i) = a(j) <=> A323161(i+1) = A323161(j+1).
The shifted version of this filter, A323161, has a remarkable ability to find many sequences related to primes and prime chains. - Antti Karttunen, Jan 06 2019

Crossrefs

A list of few similarly constructed sequences follows, where each sequence is an rgs-transform of such function f, for which the value of f(n) is the n-th term of the sequence whose A-number follows after a parenthesis, unless n is of the form ..., in which case f(n) is given a constant value outside of the range of that sequence:
A322809 (A004526, unless an odd prime) [This sequence],
A322589 (A007913, unless an odd prime),
A322591 (A007947, unless an odd prime),
A322805 (A252463, unless an odd prime),
A323082 (A300840, unless an odd prime),
A322822 (A300840, unless n > 2 and a Fermi-Dirac prime, A050376),
A322988 (A322990, unless a prime power > 2),
A323078 (A097246, unless an odd prime),
A322808 (A097246, unless a squarefree number > 2),
A322816 (A048675, unless an odd prime),
A322807 (A285330, unless an odd prime),
A322814 (A286621, unless an odd prime),
A322824 (A242424, unless an odd prime),
A322973 (A006370, unless an odd prime),
A322974 (A049820, unless n > 1 and n is in A046642),
A323079 (A060681, unless an odd prime),
A322587 (A295887, unless an odd prime),
A322588 (A291751, unless an odd prime),
A322592 (A289625, unless an odd prime),
A323369 (A323368, unless an odd prime),
A323371 (A295886, unless an odd prime),
A323374 (A323373, unless an odd prime),
A323401 (A323372, unless an odd prime),
A323405 (A323404, unless an odd prime).

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; };
    A322809aux(n) = if((n>2)&&isprime(n),-1,(n>>1));
    v322809 = rgs_transform(vector(up_to,n,A322809aux(n)));
    A322809(n) = v322809[n];

Formula

a(n) = A323161(n+1) - 1.

A322822 Lexicographically earliest such sequence a that a(i) = a(j) => f(i) = f(j) for all i, j, where f(2) = -1, f(n) = 0 if n is a Fermi-Dirac prime (A050376) > 2, and f(n) = A300840(n) for all other numbers.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 29 2018

Keywords

Comments

For all i, j: a(i) = a(j) => A322823(i) = A322823(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; };
    ispow2(n) = (n && !bitand(n,n-1));
    A302777(n) = ispow2(isprimepower(n));
    A050376list(up_to) = { my(v=vector(up_to), i=0); for(n=1,oo,if(A302777(n), i++; v[i] = n); if(i == up_to,return(v))); };
    v050376 = A050376list(up_to);
    A050376(n) = v050376[n];
    A052330(n) = { my(p=1,i=1); while(n>0, if(n%2, p *= A050376(i)); i++; n >>= 1); (p); };
    A052331(n) = { my(s=0,e); while(n > 1, fordiv(n, d, if(((n/d)>1)&&ispow2(isprimepower(n/d)), e = vecsearch(v050376, n/d); if(!e, print("v050376 too short!"); return(1/0)); s += 2^(e-1); n = d; break))); (s); };
    A300840(n) = A052330(A052331(n)>>1);
    A322822aux(n) = if((2==n),-1,if(A302777(n),0,A300840(n)));
    v322822 = rgs_transform(vector(up_to,n,A322822aux(n)));
    A322822(n) = v322822[n];

A322806 Lexicographically earliest such sequence a that a(i) = a(j) => A285330(i) = A285330(j) for all i, j.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 26 2018

Keywords

Comments

Restricted growth sequence transform of A285330.

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; };
    A007947(n) = factorback(factorint(n)[, 1]); \\ From A007947
    A048675(n) = my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; \\ From A048675
    A285328(n) = { my(r); if((n > 1 && !bitand(n,(n-1))), (n/2), r=A007947(n); if(r==n,1,n = n-r; while(A007947(n) <> r, n = n-r); n)); };
    A285330(n) = if(issquarefree(n),A048675(n),A285328(n));
    v322806 = rgs_transform(vector(up_to,n,A285330(n)));
    A322806(n) = v322806[n];

A322811 a(1) = 0; for n > 1, a(n) = A001221(A285330(n)).

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 2, 2, 2, 2, 1, 2, 2, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 2, 3, 2, 1, 2, 2, 2, 3, 2, 1, 3, 1, 2, 2, 1, 2, 1, 1, 2, 3, 1, 1, 2, 1, 2, 2, 2, 2, 2, 1, 2, 1, 2, 1, 3, 2, 2, 2, 2, 1, 3, 2, 2, 3, 3, 3, 2, 1, 2, 2, 2, 1, 1, 1, 2, 2
Offset: 1

Views

Author

Antti Karttunen, Dec 27 2018

Keywords

Comments

For all i, j:
A322806(i) = A322806(j) => a(i) = a(j),
A322807(i) = A322807(j) => a(i) = a(j).

Crossrefs

Programs

Formula

a(1) = 0; for n > 1, a(n) = A001221(A285330(n)).
If n > 1 is squarefree, a(n) = A322812(n) = A001221(A048675(n)), otherwise a(n) = A001221(A285328(n)) = A001221(n).

A322861 Lexicographically earliest such sequence a that a(i) = a(j) => A278222(A285330(i)) = A278222(A285330(j)) for all i, j.

Original entry on oeis.org

1, 2, 2, 2, 2, 3, 2, 2, 3, 4, 2, 3, 2, 4, 3, 2, 2, 3, 2, 4, 4, 4, 2, 4, 4, 4, 4, 5, 2, 5, 2, 2, 4, 4, 3, 3, 2, 4, 4, 4, 2, 6, 2, 6, 7, 4, 2, 4, 5, 4, 4, 6, 2, 3, 4, 5, 4, 4, 2, 7, 2, 4, 8, 2, 4, 6, 2, 4, 4, 6, 2, 9, 2, 4, 10, 6, 3, 6, 2, 6, 9, 4, 2, 8, 4, 4, 4, 6, 2, 7, 4, 11, 4, 4, 4, 4, 2, 5, 4, 4, 2, 6, 2, 6, 5
Offset: 1

Views

Author

Antti Karttunen, Dec 31 2018

Keywords

Comments

Restricted growth sequence transform of A278222(A285330(n)).
For all i, j:
A322806(i) = A322806(j) => a(i) = a(j),
A322807(i) = A322807(j) => a(i) = a(j),
a(i) = a(j) => A322862(i) = A322862(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; };
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t };
    A007947(n) = factorback(factorint(n)[, 1]); \\ From A007947
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    A048675(n) = my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; \\ From A048675
    A285328(n) = { my(r); if((n > 1 && !bitand(n,(n-1))), (n/2), r=A007947(n); if(r==n,1,n = n-r; while(A007947(n) <> r, n = n-r); n)); };
    A285330(n) = if(moebius(n)<>0,A048675(n),A285328(n));
    A278222(n) = A046523(A005940(1+n));
    v322861 = rgs_transform(vector(up_to,n,A278222(A285330(n))));
    A322861(n) = v322861[n];
Showing 1-6 of 6 results.