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.

A246353 If n = Sum 2^e_i, e_i distinct, then a(n) = Position of (product prime_{e_i+1}) among squarefree numbers (A005117).

Original entry on oeis.org

1, 2, 3, 5, 4, 7, 11, 19, 6, 10, 14, 28, 23, 44, 65, 129, 8, 15, 21, 41, 34, 69, 101, 203, 48, 94, 144, 283, 233, 470, 703, 1405, 9, 17, 26, 49, 40, 80, 120, 236, 57, 111, 168, 334, 279, 554, 833, 1661, 89, 176, 261, 521, 438, 873, 1304, 2610, 609, 1217, 1827, 3650, 3046, 6091, 9131
Offset: 0

Views

Author

Antti Karttunen, Aug 23 2014

Keywords

Comments

This is an inverse function to A048672. Note the indexing: here the domain starts from 0, but the range starts from 1, while in A048672 it is the opposite.
Sequence is obtained when the range of A019565 is compacted so that it becomes surjective on N, thus the logarithmic scatter plots look very similar. (Same applies to A064273). Compare also to the plot of A005940.

Crossrefs

Programs

  • PARI
    allocatemem(234567890);
    default(primelimit, 2^22)
    uplim_for_13928 = 13123111;
    v013928 = vector(uplim_for_13928); A013928(n) = v013928[n];
    v013928[1]=0; n=1; while((n < uplim_for_13928), if(issquarefree(n), v013928[n+1] = v013928[n]+1, v013928[n+1] = v013928[n]); n++);
    A019565(n) = {factorback(Mat(vector(if(n, #n=vecextract(binary(n), "-1..1")), j, [prime(j), n[j]])~))}; \\ This function from M. F. Hasler
    A246353(n) = 1+A013928(A019565(n));
    for(n=0, 478, write("b246353.txt", n, " ", A246353(n)));
    
  • Python
    from math import prod, isqrt
    from sympy import prime, mobius
    def A246353(n):
        m = prod(prime(i) for i,j in enumerate(bin(n)[-1:1:-1],1) if j=='1')
        return int(sum(mobius(k)*(m//k**2) for k in range(1, isqrt(m)+1))) # Chai Wah Wu, Feb 22 2025
  • Scheme
    (definec (A246353 n) (let loop ((n n) (i 1) (p 1)) (cond ((zero? n) (A013928 (+ 1 p))) ((odd? n) (loop (/ (- n 1) 2) (+ 1 i) (* p (A000040 i)))) (else (loop (/ n 2) (+ 1 i) p)))))
    

Formula

a(n) = A013928(1+A019565(n)) = 1 + A013928(A019565(n)).
a(n) = A064273(n) + 1.
For all n >= 0, A048672(a(n)) = n.
For all n >= 1, a(A048672(n)) = n.