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.

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.

A323076 Number of iterations of map x -> 1+(x-(largest divisor d < x)), starting from x=n, needed to reach a fixed point, which is always either a prime or 1.

Original entry on oeis.org

0, 0, 0, 1, 0, 2, 0, 1, 1, 3, 0, 1, 0, 2, 1, 2, 0, 4, 0, 1, 2, 2, 0, 1, 3, 3, 1, 2, 0, 3, 0, 1, 1, 5, 1, 1, 0, 2, 2, 3, 0, 3, 0, 1, 1, 2, 0, 4, 1, 4, 2, 2, 0, 3, 2, 1, 3, 4, 0, 1, 0, 2, 1, 2, 1, 6, 0, 2, 1, 2, 0, 1, 0, 3, 3, 3, 1, 4, 0, 1, 3, 4, 0, 1, 2, 2, 1, 2, 0, 3, 1, 1, 2, 5, 2, 2, 0, 5, 1, 3, 0, 3, 0, 1, 1
Offset: 1

Views

Author

Antti Karttunen, Jan 04 2019

Keywords

Comments

Differs from A064918 at n = 25, 48, 51, 69, 75, 81, 85, 94, 95, 99, 100, 111, 115, 121, ...

Crossrefs

Cf. A060681, A064918, A323075 (the fixed points reached), A323077, A323079.
Cf. also A039651.

Programs

  • Mathematica
    {0}~Join~Array[-2 + Length@ NestWhileList[1 + (# - Divisors[#][[-2]]) &, #, UnsameQ, All] &, 104, 2] (* Michael De Vlieger, Jan 04 2019 *)
  • PARI
    A060681(n) = (n-if(1==n,n,n/vecmin(factor(n)[,1])));
    A323076(n) = { my(nn = 1+A060681(n)); if(nn==n,0,1+A323076(nn)); };

Formula

If n == (1+A060681(n)), then a(n) = 0, otherwise a(n) = 1 + a(1+A060681(n)).

A323075 The fixed point reached when map x -> 1+(x-(largest divisor d < x)) is iterated, starting from x = n.

Original entry on oeis.org

1, 2, 3, 3, 5, 3, 7, 5, 7, 3, 11, 7, 13, 5, 11, 7, 17, 3, 19, 11, 11, 7, 23, 13, 11, 5, 19, 11, 29, 7, 31, 17, 23, 3, 29, 19, 37, 11, 19, 11, 41, 7, 43, 23, 31, 13, 47, 11, 43, 5, 29, 19, 53, 11, 31, 29, 19, 7, 59, 31, 61, 17, 43, 23, 53, 3, 67, 29, 47, 19, 71, 37, 73, 11, 29, 19, 67, 11, 79, 41, 31, 7, 83, 43, 47, 23, 59, 31, 89, 13
Offset: 1

Views

Author

Antti Karttunen, Jan 04 2019

Keywords

Comments

After a(1) = 1, the fixed point reached is always a prime. Question: Do all odd primes occur infinitely often?
Yes. All odd primes occur infinitely often. A060681(2*k) = k + 1 and so for each k > 1 there exists an integer m such that a(m) = p where p is an odd prime. - David A. Corneth, Jan 07 2019

Crossrefs

Cf. A000040, A000079, A000918, A060681, A323076, A323079, A323164, A323165 (ordinal transform).
Cf. also A039650, A039654.

Programs

  • Mathematica
    {1}~Join~Array[FixedPoint[1 + (# - Divisors[#][[-2]]) &, #] &, 89, 2] (* Michael De Vlieger, Jan 04 2019 *)
  • PARI
    A060681(n) = (n-if(1==n,n,n/vecmin(factor(n)[,1])));
    A323075(n) = { my(nn = 1+A060681(n)); if(nn==n,n,A323075(nn)); };

Formula

If n == (1+A060681(n)), then a(n) = n, otherwise a(n) = a(1+A060681(n)).
a(2^k * p - 2^(k+1) + 2) = a(A000079(k) * p - A000918(k+1)) = p for k >= 0. - David A. Corneth, Jan 08 2019
a(1) = 1, and for n > 1, a(n) = A000040(A323164(n)). - Antti Karttunen, Jan 08 2019
Showing 1-3 of 3 results.