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.

Previous Showing 11-19 of 19 results.

A307035 a(n) is the unique integer k such that A108951(k) = n!.

Original entry on oeis.org

1, 1, 2, 3, 12, 20, 60, 84, 672, 1512, 5040, 7920, 47520, 56160, 157248, 393120, 6289920, 8225280, 37013760, 41368320, 275788800, 579156480, 1820206080, 2203407360, 26440888320, 73446912000, 173601792000, 585906048000, 3281073868800, 4137006182400, 20685030912000
Offset: 0

Views

Author

Allan C. Wechsler, Mar 20 2019

Keywords

Comments

For all n, n! = A108951(k) for some unique k. This sequence gives that k for each n. In some sense this sequence tells how to factor factorials into primorials.
Represent n! as a product of primorials p#. Then replace each primorial with its base prime to calculate a(n).

Examples

			Represent 7! as a product of primorials:
7! = 2^4 * 3^2 * 5 * 7 = (2#)^2 * 3# * 7#
Replace primorials by primes:
2^2 * 3 * 7 = 84.
So a(7) = 84.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) option remember; `if`(n<2, 0, f(n-1)+add(
          i[2]*x^numtheory[pi](i[1]), i=ifactors(n)[2]))
        end:
    a:= proc(n) local d, p, r; p, r:= f(n), 1;
          do d:= degree(p); if d<1 then break fi;
             p, r:= p-add(x^i, i=1..d), ithprime(d)*r
          od: r
        end:
    seq(a(n), n=0..35);  # Alois P. Heinz, Mar 21 2019
  • Mathematica
    q[n_] := Apply[Times, Table[Prime[i], {i, 1, PrimePi[n]}]]; Flatten[{1, 1, Table[val = 1; fak = n!; Do[If[PrimeQ[k], Do[If[Divisible[fak, q[k]], val = val*k; fak = fak/q[k]], {j, 1, n}]], {k, n, 2, -1}]; val, {n, 2, 30}]}] (* Vaclav Kotesovec, Mar 21 2019 *)
  • PARI
    g(n) = my(f=factor(n)); prod(k=1, #f~, my(p=f[k, 1]); (p/if(p>2, precprime(p-1), 1))^f[k, 2]); \\ A319626/A319627
    a(n) = prod(k=1, n, g(k)); \\ Daniel Suteu, Mar 21 2019
    
  • PARI
    A307035(n) = { my(m=1, pp=1); n=n!; while(1, forprime(p=2, ,if(n%p, if(2==p, return(m), break), n /= p; pp = p)); m *= pp); }; \\ Antti Karttunen, Dec 29 2019

Formula

a(0) = 1, a(n) = a(n-1) * (A319626(n) / A319627(n)), for n > 0. - Daniel Suteu, Mar 21 2019
a(n) = n! / Product_{k=1..n} A064989(k). - Vaclav Kotesovec, Mar 21 2019
a(n) = A122111(A325508(n)) = A319626(A000142(n)) = A329900(A000142(n)). - Antti Karttunen, Nov 19 & Dec 29 2019

Extensions

a(12)-a(13) from Michel Marcus, Mar 21 2019
a(14)-a(15) from Vaclav Kotesovec, Mar 21 2019
a(0), a(16)-a(30) from Alois P. Heinz, Mar 21 2019

A346109 a(n) = A276085(A108951(A346097(n))), where A346097(n) gives the denominator of the primorial deflation of A276086(A108951(n)).

Original entry on oeis.org

0, 1, 3, 2, 9, 6, 39, 1, 3, 18, 249, 12, 2559, 78, 54, 2, 32589, 6, 543099, 36, 234, 498, 10242789, 9, 96, 5118, 42, 156, 233335659, 45, 6703028889, 10, 1494, 65178, 312, 12, 207263519019, 1086198, 15354, 9, 7628001653829, 39, 311878265181039, 996, 165, 20485578, 13394639596851069, 21, 1284, 192, 195534, 10236, 628284422185342479
Offset: 1

Views

Author

Antti Karttunen, Jul 08 2021

Keywords

Crossrefs

Programs

Formula

a(n) = A346108(n) - A108951(n).

A348993 a(n) = A064989(sigma(n) / gcd(sigma(n), A003961(n))), where A003961 shifts the prime factorization of n one step towards larger primes, while A064989 shifts it back towards smaller primes, and sigma is the sum of divisors function.

Original entry on oeis.org

1, 1, 1, 5, 2, 1, 1, 3, 11, 2, 2, 5, 5, 1, 2, 29, 4, 11, 3, 1, 1, 2, 2, 1, 29, 5, 1, 5, 6, 2, 1, 5, 2, 4, 2, 55, 17, 3, 5, 3, 10, 1, 7, 5, 22, 2, 2, 29, 34, 29, 4, 25, 8, 1, 4, 3, 1, 6, 6, 1, 29, 1, 11, 113, 2, 2, 13, 5, 2, 2, 4, 11, 31, 17, 29, 15, 2, 5, 3, 29, 49, 10, 10, 5, 8, 7, 2, 3, 12, 22, 5, 5, 1, 2, 6, 5
Offset: 1

Views

Author

Antti Karttunen, Nov 10 2021

Keywords

Crossrefs

Cf. A000203, A000265, A003961, A064989, A161942, A342671, A348992, A349162, A349169 (gives odd k for which a(k) = A319627(k)).

Programs

  • Mathematica
    Array[Times @@ Map[If[#1 <= 2, 1, NextPrime[#1, -1]]^#2 & @@ # &, FactorInteger[#1/GCD[##]]] & @@ {DivisorSigma[1, #], Times @@ Map[NextPrime[#1]^#2 & @@ # &, FactorInteger[#]]} &, 96] (* Michael De Vlieger, Nov 11 2021 *)
  • PARI
    A003961(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A349162(n) = { my(s=sigma(n)); (s/gcd(s,A003961(n))); };
    A348993(n) = A064989(A349162(n));

Formula

a(n) = A064989(A349162(n)) = A064989(A348992(n)).

A346107 a(n) = A108951(A346097(n)), where A346097(n) gives the denominator of the primorial deflation of A276086(A108951(n)).

Original entry on oeis.org

1, 2, 6, 4, 30, 36, 210, 2, 6, 900, 2310, 1296, 30030, 44100, 729000000, 4, 510510, 36, 9699690, 810000, 85766121000000, 5336100, 223092870, 216, 39690000, 901800900, 1260, 1944810000, 6469693230, 24300000, 200560490130, 60, 151939915084881000000, 260620460100, 3782285936100000000, 1296, 7420738134810, 94083986096100
Offset: 1

Views

Author

Antti Karttunen, Jul 08 2021

Keywords

Crossrefs

Programs

Formula

a(n) = A346106(n) / A324886(n).

A348994 a(n) = A003961(n) / gcd(n, A003961(n)), where A003961(n) is fully multiplicative with a(prime(k)) = prime(k+1).

Original entry on oeis.org

1, 3, 5, 9, 7, 5, 11, 27, 25, 21, 13, 15, 17, 33, 7, 81, 19, 25, 23, 63, 55, 39, 29, 45, 49, 51, 125, 99, 31, 7, 37, 243, 65, 57, 11, 25, 41, 69, 85, 189, 43, 55, 47, 117, 35, 87, 53, 135, 121, 147, 95, 153, 59, 125, 91, 297, 115, 93, 61, 21, 67, 111, 275, 729, 119, 65, 71, 171, 145, 33, 73, 75, 79, 123, 49, 207
Offset: 1

Views

Author

Antti Karttunen, Nov 10 2021

Keywords

Comments

Numerator of ratio A003961(n) / n. This ratio is fully multiplicative, and a(n) / A348990(n) = A319626(A003961(n)) / A319627(A003961(n)) gives it in its lowest terms.

Crossrefs

Cf. A003961, A319626, A319627, A348990 (denominators).

Programs

  • Mathematica
    Array[#2/GCD[##] & @@ {#, If[# == 1, 1, Times @@ Map[NextPrime[#1]^#2 & @@ # &, FactorInteger[#]]]} &, 76] (* Michael De Vlieger, Nov 11 2021 *)
  • PARI
    A003961(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
    A348994(n) = (A003961(n) / gcd(n, A003961(n)));

Formula

a(n) = A003961(n) / gcd(n, A003961(n)).
a(n) = A319626(A003961(n)).

A348990 a(n) = n / gcd(n, A003961(n)), where A003961(n) is fully multiplicative function with a(prime(k)) = prime(k+1).

Original entry on oeis.org

1, 2, 3, 4, 5, 2, 7, 8, 9, 10, 11, 4, 13, 14, 3, 16, 17, 6, 19, 20, 21, 22, 23, 8, 25, 26, 27, 28, 29, 2, 31, 32, 33, 34, 5, 4, 37, 38, 39, 40, 41, 14, 43, 44, 9, 46, 47, 16, 49, 50, 51, 52, 53, 18, 55, 56, 57, 58, 59, 4, 61, 62, 63, 64, 65, 22, 67, 68, 69, 10, 71, 8, 73, 74, 15, 76, 7, 26, 79, 80, 81, 82, 83, 28
Offset: 1

Views

Author

Antti Karttunen, Nov 10 2021

Keywords

Comments

Denominator of ratio A003961(n) / n. This ratio is fully multiplicative, and A348994(n) / a(n) = A319626(A003961(n)) / A319627(A003961(n)) gives it in its lowest terms.

Crossrefs

Cf. A000035, A000961, A002110, A003961, A319626, A319627, A319630 (fixed points), A322361, A349169 (where equal to A348992).
Cf. A348994 (numerators).

Programs

  • Mathematica
    Array[#1/GCD[##] & @@ {#, Times @@ Map[NextPrime[#1]^#2 & @@ # &, FactorInteger[#]]} &, 84] (* Michael De Vlieger, Nov 11 2021 *)
  • PARI
    A003961(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
    A348990(n) = (n/gcd(n, A003961(n)));

Formula

a(n) = n / A322361(n) = n / gcd(n, A003961(n)).
a(n) = A319627(A003961(n)).
For all odd numbers n, a(n) = A003961(A319627(n)).
For all n >= 1, A000035(A348990(n)) = A000035(n). [Preserves the parity]

A355930 Sum of the prime indices of n minus the sum of the prime indices of the smallest number with same prime signature as n, when the sum is taken with multiplicity, as in A056239.

Original entry on oeis.org

0, 0, 1, 0, 2, 0, 3, 0, 2, 1, 4, 0, 5, 2, 2, 0, 6, 1, 7, 1, 3, 3, 8, 0, 4, 4, 3, 2, 9, 0, 10, 0, 4, 5, 4, 0, 11, 6, 5, 1, 12, 1, 13, 3, 3, 7, 14, 0, 6, 3, 6, 4, 15, 2, 5, 2, 7, 8, 16, 0, 17, 9, 4, 0, 6, 2, 18, 5, 8, 2, 19, 0, 20, 10, 4, 6, 6, 3, 21, 1, 4, 11, 22, 1, 7, 12, 9, 3, 23, 1, 7, 7, 10, 13, 8, 0, 24, 5, 5, 2, 25, 4, 26, 4, 3
Offset: 1

Views

Author

Antti Karttunen as suggested by Don Reble, Oct 25 2022

Keywords

Comments

a(n) gives the signature excitation of n (a concept proposed by Allan C. Wechsler, indicating the distance of n from the terms of A025487), when the primes in the "excited state", i.e., those present in A328478(n), are de-excited one by one, and the prime signature of n is preserved. See the example.

Examples

			For n = 98 = 2*7*7, the other 7 is de-excited as 7 -> 5 -> 3 -> 2, and the other 7 is de-excited as 7 -> 5 -> 3, to get 2*2*3 = 12 = A046523(98). There are 3+2 de-excitations in total, therefore a(98) = 5.
		

Crossrefs

Cf. A025487 (positions of zeros), A046523, A056239.
Cf. also A319627, A328478, A358218.
Differs from A325799 for the first time at n=18, where a(18) = 1, while A325799(18) = 0.

Programs

  • Mathematica
    {0}~Join~Array[Total@ Flatten[ConstantArray[PrimePi[#1], #2] & @@@ #] - Total@ Flatten@ MapIndexed[ConstantArray[First[#2], #1] &, ReverseSort[#[[All, -1]]]] &@ FactorInteger[#] &, 104, 2] (* Michael De Vlieger, Nov 02 2022 *)
  • PARI
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
    A056239(n) = { my(f); if(1==n, 0, f=factor(n); sum(i=1, #f~, f[i, 2] * primepi(f[i, 1]))); }
    A355930(n) = (A056239(n) - A056239(A046523(n)));

Formula

a(n) = A056239(n) - A356159(n) = A056239(n) - A056239(A046523(n)).
For all n, a(n) >= A358218(n). - Antti Karttunen, Nov 05 2022

A358219 Indices k where A358217(k) != A358218(k).

Original entry on oeis.org

15, 35, 45, 70, 75, 77, 105, 135, 140, 143, 154, 165, 175, 195, 221, 225, 231, 245, 255, 280, 285, 286, 308, 315, 323, 345, 350, 375, 385, 405, 429, 435, 437, 442, 450, 455, 462, 465, 490, 495, 525, 539, 555, 560, 572, 585, 595, 615, 616, 645, 646, 663, 665, 667, 675, 693, 700, 705, 715, 735, 765, 770, 795, 805
Offset: 1

Views

Author

Antti Karttunen, Nov 04 2022

Keywords

Crossrefs

A366877 Lexicographically earliest infinite sequence such that a(i) = a(j) => A337377(i) = A337377(j) for all i, j >= 0, where A337377 is the primorial deflation (denominator) of Doudna sequence.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 4, 1, 5, 3, 2, 1, 6, 2, 7, 1, 8, 5, 9, 3, 3, 1, 4, 1, 10, 6, 11, 1, 12, 4, 13, 1, 14, 8, 15, 5, 16, 5, 17, 3, 5, 3, 2, 1, 6, 2, 7, 1, 18, 10, 19, 6, 20, 3, 4, 1, 21, 12, 22, 2, 23, 7, 24, 1, 25, 14, 26, 8, 27, 8, 28, 5, 29, 16, 15, 5, 30, 9, 31, 3, 8, 5, 9, 3, 3, 1, 4, 1, 10, 6, 11, 1, 12, 4, 13, 1, 32, 18
Offset: 0

Views

Author

Antti Karttunen, Oct 26 2023

Keywords

Comments

Restricted growth sequence transform of A337377.

Crossrefs

Programs

  • PARI
    up_to = 65537;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); };
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A319627(n) = (A064989(n) / gcd(n, A064989(n)));
    A337377(n) = A319627(A005940(1+n));
    v366877 = rgs_transform(vector(1+up_to,n,A337377(n-1)));
    A366877(n) = v366877[1+n];
Previous Showing 11-19 of 19 results.