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

A337474 Number of prime shifts (x -> A003961(x)) needed before the result is deficient, when starting from x = A108951(n), the primorial inflation of n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 28 2020

Keywords

Comments

a(n) is the least k for which A337473(k, n) = 1.

Crossrefs

Cf. A337476 (position of the first occurrence of each n), A337478.

Programs

  • PARI
    A337473sq(n, k) = if(1==k,k, my(f=factor(k), h = #f~, prevpid=primepi(f[h,1]), e=f[h,2], p, s=1); forstep(i=h-1,0,-1, if(!i,pid=0,pid=primepi(f[i,1])); forstep(j=prevpid,(1+pid),-1, p=prime(j+n); s *= ((p^(1+e)-1)/((p-1)*(p^e)))); if(!pid,return(floor(s))); prevpid = pid; e += f[i,2]); floor(s));
    A337474(n) = for(i=0,oo,if(1==A337473sq(i,n),return(i)));
    
  • PARI
    \\ This version uses binary search, which is faster in certain cases:
    isA337473sq1(n, k) = if(1==k,k, my(f=factor(k), h = #f~, prevpid=primepi(f[h,1]), e=f[h,2], p, s=1); forstep(i=h-1,0,-1, if(!i,pid=0,pid=primepi(f[i,1])); forstep(j=prevpid,(1+pid),-1, p=prime(j+n); s *= ((p^(1+e)-1)/((p-1)*(p^e)))); if(!pid,return(s<2)); prevpid = pid; e += f[i,2]); (s<2));
    A337474(n) = if(!bitand(n,n-1),0,my(imin=0,imax=n,imid); for(i=0,oo, imid=(imax+imin)\2; if(1!=isA337473sq1(imid,n), imin = imid+1, if(1!=isA337473sq1(imid-1,n),return(imid), imax = imid-1))));

Formula

a(n) = A336835(A108951(n)).
a(A181815(n)) = A337475(n).
For all n >= 0, a(A337476(n)) = n.
For all n >= 0, a(A337478(n)) >= n.

A337478 Primorial deflation of A336389.

Original entry on oeis.org

1, 3, 20, 38, 159, 749, 1337
Offset: 0

Views

Author

Antti Karttunen, Aug 29 2020

Keywords

Crossrefs

Formula

a(n) = A319626(A336389(n)) = A329900(A336389(n)).
For all n >= 0, A337474(a(n)) >= n and a(n) >= A337476(n).

A337477 Position of the first term >= n in A337475.

Original entry on oeis.org

1, 4, 17, 570, 63826, 13810338
Offset: 0

Views

Author

Antti Karttunen, Aug 28 2020

Keywords

Comments

At least for n=0..5, A336835(A025487(a(n))) = n.

Crossrefs

Formula

For all n >= 0, A025487(a(n)) = A336389(n).

A337473 Square array read by falling antidiagonals, where A(n,k) = floor(A337472(n, k)/A337470(n, k)); Abundancy index of A337470(n, k) floored down.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 28 2020

Keywords

Comments

Array is read by descending antidiagonals with n >= 0 and k >= 1 ranging as: (0, 1), (0, 2), (1, 1), (0, 3), (1, 2), (2, 1), (0, 4), (1, 3), (2, 2), (3, 1), ...

Examples

			The top left corner of the array begins as:
n/k | 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
----|----------------------------------------------------------------------
  0 | 1, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 3, 3, 3, 1, 3, 2, 3, 3, 3, 3, 3,
  1 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 2, 2,
  2 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
  3 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  4 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  5 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
etc.
A337474 gives the distance in each column to the first 1 in that column, being 0 for columns 1, 2, 4, 8, 16, ..., where 1 is already in the top row.
		

Crossrefs

Programs

  • PARI
    up_to = 105858-1; \\ Or 105-1.
    A337473sq(n, k) = if(1==k,k, my(f=factor(k), h = #f~, prevpid=primepi(f[h,1]), e=f[h,2], p, s=1); forstep(i=h-1,0,-1, if(!i,pid=0,pid=primepi(f[i,1])); forstep(j=prevpid,(1+pid),-1, p=prime(j+n); s *= ((p^(1+e)-1)/((p-1)*(p^e)))); if(!pid,return(floor(s))); prevpid = pid; e += f[i,2]); floor(s));
    A337473list(up_to) = { my(v = vector(1+up_to), i=0); for(a=0, oo, for(b=1, a, i++; if(i > #v, return(v)); v[i] = A337473sq(b-1, (a-(b-1))))); (v); };
    v337473 = A337473list(up_to);
    A337473(n) = v337473[1+n];

Formula

A(n,k) = floor(A337472(n, k)/A337470(n, k)).
Showing 1-4 of 4 results.