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.

A376411 a(n) is the number of terms less than A276086(n) in the range of A276086, where A276086 is the primorial base exp-function.

Original entry on oeis.org

0, 1, 2, 4, 6, 13, 3, 7, 11, 21, 32, 64, 18, 36, 54, 108, 162, 325, 90, 180, 271, 541, 812, 1624, 450, 902, 1354, 2707, 4061, 8122, 5, 10, 15, 30, 45, 91, 25, 50, 75, 151, 227, 454, 126, 253, 378, 758, 1137, 2274, 632, 1264, 1895, 3790, 5685, 11370, 3158, 6317, 9475, 18952, 28428, 56856, 35, 70, 106, 212, 318, 637
Offset: 0

Views

Author

Antti Karttunen, Nov 13 2024

Keywords

Comments

Number of terms of A048103 that are less than A276086(n).
Permutation of nonnegative integers.
Troughs are at primorials, A002110, and the local maxima occur just before, at A057588.

Crossrefs

Cf. A376413 (inverse permutation, but note the different offsets and ranges).
Cf. also A064273 (analogous permutation for base-2).

Programs

  • PARI
    up_to = (2*210)-1; \\ Must be one of the terms of A343048.
    A276085(n) = { my(f = factor(n), pr=1, i=1, s=0); for(k=1, #f~, while(i <= primepi(f[k, 1])-1, pr *= prime(i); i++); s += f[k, 2]*pr); (s); };
    A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); };
    A359550(n) = { my(pp); forprime(p=2, , pp = p^p; if(!(n%pp), return(0)); if(pp > n, return(1))); };
    A376411list(up_to) = { my(size=up_to, v=vector(size), m=A276086(size), s=1, j); for(i=2,m,if(!(m%i), j=A276085(i); v[j] = s; print1("i=",i," v[",j,"]=",s", ");); s += A359550(i)); (v); };
    v376411 = A376411list(up_to);
    A376411(n) = if(!n,n,v376411[n]);
    
  • PARI
    \\ For incremental computing, less efficient than above:
    A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); };
    A359550(n) = { my(pp); forprime(p=2, , pp = p^p; if(!(n%pp), return(0)); if(pp > n, return(1))); };
    memoA376411 = Map(); \\ We use k=A276086(n) as our key. kvs will be a list of key-value-pairs sorted into descending order by the key. We search the largest key in it < k, and continue summing from that:
    A376411(n) = if(n<=2,n,my(v, k=A276086(n)); if(mapisdefined(memoA376411,k,&v), v, my(kvs = vecsort(Mat(memoA376411)~,(x,y) -> sign(y[1]-x[1])), ss=si=0); for(i=1, #kvs, if(kvs[1,i]A359550(i)); mapput(memoA376411,k,v); (v)));

Formula

a(n) = A377982(A276086(n))-1 = Sum_{i=1 .. A276086(n)-1} A359550(i).
For all n >= 1, a(A376413(n)) = n-1, and for all n >= 0, A376413(1+a(n)) = n.
a(i)/a(j) ~ A276086(i)/A276086(j), and particularly, a(2*n+1) ~ 2*a(2*n).