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.

A253553 a(1) = 1; for n>1, if A241917(n) = 0 [i.e., n is a term of A070003], a(n) = A052126(n), otherwise a(n) = A252462(n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jan 12 2015

Keywords

Comments

If the exponent of the largest prime dividing n is larger than one, subtract one from that exponent. Otherwise, shift that "lonely largest prime" one step towards smaller primes.
For any number n >= 2 in binary trees A253563 and A253565, a(n) gives the number which is the parent of n.

Crossrefs

Cf. A252464 (the number of iterations of n -> a(n) needed to reach 1 from n.)

Programs

  • PARI
    A253553(n) = if(n<=2,1,my(f=factor(n), k=#f~); if(f[k,2]>1,f[k,2]--,f[k,1] = precprime(f[k,1]-1)); factorback(f)); \\ Antti Karttunen, Jul 17 2020
    
  • Scheme
    (define (A253553 n) (cond ((<= n 1) n) ((zero? (A241917 n)) (A052126 n)) (else (A252462 n))))

Formula

a(1) = 1; for n>1, if A241917(n) = 0 [i.e., n is a term of A070003], a(n) = A052126(n), otherwise a(n) = A252462(n).
a(n) = A122111(A252463(A122111(n))). - Antti Karttunen, Jul 14 2020