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

A337476 Position of the first occurrence of n in A337474.

Original entry on oeis.org

1, 3, 11, 23, 61, 127, 199, 331, 467, 673, 929, 1181, 1493, 1861, 2243, 2693, 3221, 3739, 4327, 4993, 5689, 6421, 7283, 8191, 9137, 10111, 11161, 12281, 13451, 14747, 16067, 17569, 19037, 20509, 22051, 23687, 25411, 27179, 29023, 31019, 32971, 34963, 37097, 39371, 41651, 44021, 46559, 49169, 51719
Offset: 0

Views

Author

Antti Karttunen, Aug 28 2020

Keywords

Crossrefs

Formula

For all n >= 0, A337474(a(n)) = n.
For all n >= 1, a(n) = A000040(A107705(n)). [Conjectured, see comment in A108227]
For all n >= 0, a(n) <= A337478(n).

A108951 Primorial inflation of n: Fully multiplicative with a(p) = p# for prime p, where x# is the primorial A034386(x).

Original entry on oeis.org

1, 2, 6, 4, 30, 12, 210, 8, 36, 60, 2310, 24, 30030, 420, 180, 16, 510510, 72, 9699690, 120, 1260, 4620, 223092870, 48, 900, 60060, 216, 840, 6469693230, 360, 200560490130, 32, 13860, 1021020, 6300, 144, 7420738134810, 19399380, 180180, 240, 304250263527210, 2520
Offset: 1

Views

Author

Paul Boddington, Jul 21 2005

Keywords

Comments

This sequence is a permutation of A025487.
And thus also a permutation of A181812, see the formula section. - Antti Karttunen, Jul 21 2014
A previous description of this sequence was: "Multiplicative with a(p^e) equal to the product of the e-th powers of all primes at most p" (see extensions), Giuseppe Coppoletta, Feb 28 2015

Examples

			a(12) = a(2^2) * a(3) = (2#)^2 * (3#) = 2^2 * 6 = 24
a(45) = (3#)^2 * (5#) = (2*3)^2 * (2*3*5) = 1080 (as 45 = 3^2 * 5).
		

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = Module[{f = FactorInteger[n], p, e}, If[Length[f]>1, Times @@ a /@ Power @@@ f, {{p, e}} = f; Times @@ (Prime[Range[PrimePi[p]]]^e)]]; a[1] = 1; Table[a[n], {n, 1, 42}] (* Jean-François Alcover, Feb 24 2015 *)
    Table[Times @@ Map[#1^#2 & @@ # &, FactorInteger[n] /. {p_, e_} /; e > 0 :> {Times @@ Prime@ Range@ PrimePi@ p, e}], {n, 42}] (* Michael De Vlieger, Mar 18 2017 *)
  • PARI
    primorial(n)=prod(i=1,primepi(n),prime(i))
    a(n)=my(f=factor(n)); prod(i=1,#f~, primorial(f[i,1])^f[i,2]) \\ Charles R Greathouse IV, Jun 28 2015
    
  • Python
    from sympy import primerange, factorint
    from operator import mul
    def P(n): return reduce(mul, [i for i in primerange(2, n + 1)])
    def a(n):
        f = factorint(n)
        return 1 if n==1 else reduce(mul, [P(i)**f[i] for i in f])
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, May 14 2017
  • Sage
    def sharp_primorial(n): return sloane.A002110(prime_pi(n))
    def p(f):
        return sharp_primorial(f[0])^f[1]
    [prod(p(f) for f in factor(n)) for n in range (1,51)]
    # Giuseppe Coppoletta, Feb 07 2015
    

Formula

Dirichlet g.f.: 1/(1-2*2^(-s))/(1-6*3^(-s))/(1-30*5^(-s))...
Completely multiplicative with a(p_i) = A002110(i) = prime(i)#. [Franklin T. Adams-Watters, Jun 24 2009; typos corrected by Antti Karttunen, Jul 21 2014]
From Antti Karttunen, Jul 21 2014: (Start)
a(1) = 1, and for n > 1, a(n) = n * a(A064989(n)).
a(n) = n * A181811(n).
a(n) = A002110(A061395(n)) * A331188(n). - [added Jan 14 2020]
a(n) = A181812(A048673(n)).
Other identities:
A006530(a(n)) = A006530(n). [Preserves the largest prime factor of n.]
A071178(a(n)) = A071178(n). [And also its exponent.]
a(2^n) = 2^n. [Fixes the powers of two.]
A067029(a(n)) = A007814(a(n)) = A001222(n). [The exponent of the least prime of a(n), that prime always being 2 for n>1, is equal to the total number of prime factors in n.]
(End)
From Antti Karttunen, Nov 19 2019: (Start)
Further identities:
a(A307035(n)) = A000142(n).
a(A003418(n)) = A181814(n).
a(A025487(n)) = A181817(n).
a(A181820(n)) = A181822(n).
a(A019565(n)) = A283477(n).
A001221(a(n)) = A061395(n).
A001222(a(n)) = A056239(n).
A181819(a(n)) = A122111(n).
A124859(a(n)) = A181821(n).
A085082(a(n)) = A238690(n).
A328400(a(n)) = A329600(n). (smallest number with the same set of distinct prime exponents)
A000188(a(n)) = A329602(n). (square root of the greatest square divisor)
A072411(a(n)) = A329378(n). (LCM of exponents of prime factors)
A005361(a(n)) = A329382(n). (product of exponents of prime factors)
A290107(a(n)) = A329617(n). (product of distinct exponents of prime factors)
A000005(a(n)) = A329605(n). (number of divisors)
A071187(a(n)) = A329614(n). (smallest prime factor of number of divisors)
A267115(a(n)) = A329615(n). (bitwise-AND of exponents of prime factors)
A267116(a(n)) = A329616(n). (bitwise-OR of exponents of prime factors)
A268387(a(n)) = A329647(n). (bitwise-XOR of exponents of prime factors)
A276086(a(n)) = A324886(n). (prime product form of primorial base expansion)
A324580(a(n)) = A324887(n).
A276150(a(n)) = A324888(n). (digit sum in primorial base)
A267263(a(n)) = A329040(n). (number of distinct nonzero digits in primorial base)
A243055(a(n)) = A329343(n).
A276088(a(n)) = A329348(n). (least significant nonzero digit in primorial base)
A276153(a(n)) = A329349(n). (most significant nonzero digit in primorial base)
A328114(a(n)) = A329344(n). (maximal digit in primorial base)
A062977(a(n)) = A325226(n).
A097248(a(n)) = A283478(n).
A324895(a(n)) = A324896(n).
A324655(a(n)) = A329046(n).
A327860(a(n)) = A329047(n).
A329601(a(n)) = A329607(n).
(End)
a(A181815(n)) = A025487(n), and A319626(a(n)) = A329900(a(n)) = n. - Antti Karttunen, Dec 29 2019
From Antti Karttunen, Jul 09 2021: (Start)
a(n) = A346092(n) + A346093(n).
a(n) = A346108(n) - A346109(n).
a(A342012(n)) = A004490(n).
a(A337478(n)) = A336389(n).
A336835(a(n)) = A337474(n).
A342002(a(n)) = A342920(n).
A328571(a(n)) = A346091(n).
A328572(a(n)) = A344592(n).
(End)
Sum_{n>=1} 1/a(n) = A161360. - Amiram Eldar, Aug 04 2022

Extensions

More terms computed by Antti Karttunen, Jul 21 2014
The name of the sequence was changed for more clarity, in accordance with the above remark of Franklin T. Adams-Watters (dated Jun 24 2009). It is implicitly understood that a(n) is then uniquely defined by completely multiplicative extension. - Giuseppe Coppoletta, Feb 28 2015
Name "Primorial inflation" (coined by Matthew Vandermast in A181815) prefixed to the name by Antti Karttunen, Jan 14 2020

A341605 Square array A(n,k) = A017665(A246278(n,k)), read by falling antidiagonals; numerator of the abundancy index as applied onto prime shift array A246278.

Original entry on oeis.org

3, 7, 4, 2, 13, 6, 15, 8, 31, 8, 9, 40, 48, 57, 12, 7, 32, 156, 96, 133, 14, 12, 26, 72, 400, 168, 183, 18, 31, 16, 248, 16, 1464, 252, 307, 20, 13, 121, 84, 684, 216, 2380, 360, 381, 24, 21, 124, 781, 144, 1862, 280, 5220, 480, 553, 30, 18, 104, 342, 2801, 240, 3294, 432, 7240, 720, 871, 32
Offset: 1

Views

Author

Antti Karttunen, Feb 16 2021

Keywords

Comments

Ratio A341605(row, col)/A341606(row, col) shows the abundancy index when applied to the natural numbers > 1 as ordered in the prime shift array A246278:
n = 1 2 3 4 5 6
2n = 2 4 6 8 10 12
----+--------------------------------------------------------------------------
1 | 3/2, 7/4, 2/1, 15/8, 9/5, 7/3,
2 | 4/3, 13/9, 8/5, 40/27, 32/21, 26/15,
3 | 6/5, 31/25, 48/35, 156/125, 72/55, 248/175,
4 | 8/7, 57/49, 96/77, 400/343, 16/13, 684/539,
5 | 12/11, 133/121, 168/143, 1464/1331, 216/187, 1862/1573,
6 | 14/13, 183/169, 252/221, 2380/2197, 280/247, 3294/2873,
7 | 18/17, 307/289, 360/323, 5220/4913, 432/391, 6140/5491,
we see that when going down in each column, the magnitude of the ratio decreases monotonically, which follows because the abundancy index of prime(i+1)^e is less than that of prime(i)^e (see A336389). The first ratio that is < 2 (corresponding to the first deficient number obtained when 2*n is successively prime shifted) is found at row number 1+A336835(2*n) = 1+A378985(n) for column n.
Each ratio r at row n and column k is a product of the topmost ratio (on row 1), and the product of all ratios on rows 1..(row-1) given in arrays A341626/A341627:
n = 1 2 3 4 5 6
2n = 2 4 6 8 10 12
----+--------------------------------------------------------------------------
1 | 8/9, 52/63, 4/5, 64/81, 160/189, 26/35,
2 | 9/10, 279/325, 6/7, 1053/1250, 189/220, 372/455,
3 | 20/21, 1425/1519, 10/11, 12500/13377, 110/117, 4275/4774,
4 | 21/22, 343/363, 49/52, 62769/66550, 351/374, 2401/2574,
5 | 77/78, 22143/22477, 33/34, 791945/804102, 6545/6669, 199287/205751,
6 | 117/119, 51883/52887, 130/133, 573417/584647, 13338/13685, 518830/531981,
In other words, if r(row,col) = A341605(row,col)/A341606(row,col) and d(row,col) = A341626(row,col)/A341627(row,col), then r(row+1,col) = r(row,col)*d(row,col), that is, each column in the latter arrays of ratios gives the first quotients of ratios in the corresponding columns in the former array, and they are all < 1.
See also comments and examples in A341606.
By lemma given in A341529, the ratio A341626/A341627 stays in open interval (0.5 .. 1). - Antti Karttunen, Jan 02 2025

Examples

			The top left corner of the array:
  k=   1    2    3      4    5      6    7       8      9     10    11      12
2k =   2    4    6      8   10     12   14      16     18     20    22      24
----+--------------------------------------------------------------------------
n=1 |  3,   7,   2,    15,   9,     7,  12,     31,    13,    21,   18,      5,
  2 |  4,  13,   8,    40,  32,    26,  16,    121,   124,   104,   56,     16,
  3 |  6,  31,  48,   156,  72,   248,  84,    781,   342,   372,  108,   1248,
  4 |  8,  57,  96,   400,  16,   684, 144,   2801,   152,   114,  160,   4800,
  5 | 12, 133, 168,  1464, 216,  1862, 240,  16105,  2196,  2394,  288,  20496,
  6 | 14, 183, 252,  2380, 280,  3294, 336,  30941,  4298,  3660,  420,   2520,
  7 | 18, 307, 360,  5220, 432,  6140, 540,  88741,  6858,  7368,  576, 104400,
  8 | 20, 381, 480,  7240, 600,  9144, 640, 137561, 11060, 11430,   40, 173760,
  9 | 24, 553, 720, 12720, 768, 16590, 912, 292561, 20904, 17696, 1008, 381600,
etc.
		

Crossrefs

Cf. A008864 (column 1), A378995 (row 1).
Cf. A341606 (denominators), A341626 (numerators of the columnwise first quotients of A341605/A341606), A341627 (and their denominators), A355925, A355927.

Programs

  • PARI
    up_to = 105;
    A246278sq(row,col) = if(1==row,2*col, my(f = factor(2*col)); for(i=1, #f~, f[i,1] = prime(primepi(f[i,1])+(row-1))); factorback(f));
    A017665(n) = numerator(sigma(n)/n);
    A341605sq(row,col) = A017665(A246278sq(row,col));
    A341605list(up_to) = { my(v = vector(up_to), i=0); for(a=1,oo, for(col=1,a, i++; if(i > up_to, return(v)); v[i] = A341605sq(col,(a-(col-1))))); (v); };
    v341605 = A341605list(up_to);
    A341605(n) = v341605[n];

Formula

A(n, k) = A017665(A246278(n, k)).
A(n, k) = A355927(n, k) / A355925(n, k). - Antti Karttunen, Jul 22 2022
A(n, k) = A379500(n, k) / A341606(n, k). - Antti Karttunen, Jan 04 2025

A336835 Number of iterations of x -> A003961(x) needed before the result is deficient (sigma(x) < 2x), when starting from x=n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 07 2020

Keywords

Comments

It holds that a(n) <= A336836(n) for all n, because sigma(n) <= A003961(n) for all n (see A286385 for a proof).
The first 3 occurs at n = 19399380, the first 4 at n = 195534950863140268380. See A336389.
If x and y are relatively prime (i.e., gcd(x,y) = 1), then a(x*y) >= max(a(x),a(y)). Compare to a similar comment in A336915.

Examples

			For n = 120, sigma(120) = 360 >= 2*120, thus 120 is not deficient, and we get the next number by applying the prime shift, A003961(120) = 945, and sigma(945) = 1920 >= 945*2, so neither 945 is deficient, so we prime shift once again, and A003961(945) = 9625, which is deficient, as sigma(9625) = 14976 < 2*9625. Thus after two iteration steps we encounter a deficient number, and therefore a(120) = 2.
		

Crossrefs

Cf. A336389 (position of the first occurrence of a term >= n).
Differs from A294936 for the first time at n=120.
Cf. also A246271, A252459, A336836 and A336915 for similar iterations.

Programs

  • Mathematica
    Array[-1 + Length@ NestWhileList[If[# == 1, 1, Times @@ Map[#1^#2 & @@ # &, FactorInteger[#] /. {p_, e_} /; e > 0 :> {Prime[PrimePi@ p + 1], e}]] &, #, DivisorSigma[1, #] >= 2 # &] &, 120] (* Michael De Vlieger, Aug 27 2020 *)
  • PARI
    A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From A003961
    A336835(n) = { my(i=0); while(sigma(n) >= (n+n), i++; n = A003961(n)); (i); };

Formula

If A294934(n) = 1, a(n) = 0, otherwise a(n) = 1 + a(A003961(n)).
From Antti Karttunen, Aug 21-Sep 01 2020: (Start)
For all n >= 1,
a(A046523(n)) >= a(n).
a(A071364(n)) >= a(n).
a(A108951(n)) = A337474(n).
a(A025487(n)) = A337475(n).
(End)

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).

A337475 a(n) = A336835(A025487(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Aug 28 2020

Keywords

Crossrefs

Formula

a(n) = A336835(A025487(n)).
a(n) = A337474(A181815(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-7 of 7 results.