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.

A286470 a(n) = maximal gap between indices of successive primes in the prime factorization of n.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 1, 0, 3, 1, 0, 0, 1, 0, 2, 2, 4, 0, 1, 0, 5, 0, 3, 0, 1, 0, 0, 3, 6, 1, 1, 0, 7, 4, 2, 0, 2, 0, 4, 1, 8, 0, 1, 0, 2, 5, 5, 0, 1, 2, 3, 6, 9, 0, 1, 0, 10, 2, 0, 3, 3, 0, 6, 7, 2, 0, 1, 0, 11, 1, 7, 1, 4, 0, 2, 0, 12, 0, 2, 4, 13, 8, 4, 0, 1, 2, 8, 9, 14, 5, 1, 0, 3, 3, 2, 0, 5, 0, 5, 1, 15, 0, 1, 0, 2, 10, 3, 0, 6, 6, 9, 4, 16, 3, 1
Offset: 1

Views

Author

Antti Karttunen, May 13 2017

Keywords

Examples

			For n = 70 = 2*5*7 = prime(1)*prime(3)*prime(4), the largest index difference occurs between prime(1) and prime(3), thus a(70) = 3-1 = 2.
		

Crossrefs

Cf. A286469 (version which considers the index of the smallest prime as the initial gap).
Cf. A000961 (positions of zeros).
Differs from A242411 for the first time at n=70, where a(70) = 2, while A242411(70) = 1.

Programs

  • Mathematica
    Table[If[Or[n == 1, PrimeNu@ n == 1], 0, Max@ Differences@ PrimePi[FactorInteger[n][[All, 1]]]], {n, 120}] (* Michael De Vlieger, May 16 2017 *)
  • Python
    from sympy import primepi, isprime, primefactors, divisors
    def a049084(n): return primepi(n)*(1*isprime(n))
    def a055396(n): return 0 if n==1 else a049084(min(primefactors(n)))
    def x(n): return 1 if n==1 else divisors(n)[-2]
    def a(n): return 0 if n==1 or len(primefactors(n))==1 else max(a055396(x(n)) - a055396(n), a(x(n))) # Indranil Ghosh, May 17 2017
  • Scheme
    (define (A286470 n) (cond ((or (= 1 n) (= 1 (A001221 n))) 0) (else (max (- (A055396 (A032742 n)) (A055396 n)) (A286470 (A032742 n))))))
    

Formula

a(1) = 0, for n > 1, if A001221(n) = 1 [when n is a prime power], a(n) = 0, otherwise a(n) = max((A055396(A032742(n))-A055396(n)), a(A032742(n))).
For all n >= 1, a(n) <= A243055(n).

Extensions

Definition corrected by Zak Seidov, May 16 2017

A286454 Compound filter (prime signature & prime signature of conjugated prime factorization): a(n) = P(A101296(n), A286621(n)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

1, 5, 8, 9, 12, 32, 23, 20, 13, 49, 38, 51, 47, 82, 49, 35, 68, 51, 80, 72, 124, 140, 122, 74, 18, 175, 26, 111, 155, 334, 192, 65, 257, 280, 82, 116, 255, 329, 355, 99, 327, 570, 380, 177, 72, 469, 437, 132, 31, 72, 532, 216, 498, 74, 257, 144, 599, 634, 597, 448, 632, 745, 159, 119, 784, 1044, 782, 331, 907, 570, 863, 186, 905, 1039, 72, 384, 140, 1335, 1037
Offset: 1

Views

Author

Antti Karttunen, May 14 2017

Keywords

Comments

Here, instead of A046523 and A278221 we use as the components of a(n) their rgs-versions A101296 and A286621 because of the latter sequence's moderate growth rates.
For all i, j: a(i) = a(j) => A286356(i) = A286356(j).

Crossrefs

Programs

Formula

a(n) = (1/2)*(2 + ((A101296(n)+A286621(n))^2) - A101296(n) - 3*A286621(n)).

A286456 Compound filter: a(n) = P(A056239(n), A243503(n)), with a(1) = 0, where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

0, 1, 5, 5, 13, 18, 25, 13, 19, 40, 41, 40, 61, 71, 41, 25, 85, 41, 113, 83, 72, 111, 145, 71, 42, 160, 42, 142, 181, 84, 221, 41, 112, 218, 73, 72, 265, 285, 161, 142, 313, 143, 365, 217, 85, 361, 421, 111, 74, 85, 219, 308, 481, 73, 113, 238, 286, 446, 545, 143, 613, 540, 144, 61, 162, 218, 685, 415, 362, 144, 761, 112, 841, 643, 86, 538, 114, 309, 925, 217
Offset: 1

Views

Author

Antti Karttunen, May 14 2017

Keywords

Crossrefs

Programs

Formula

a(1) = 0 and for n > 1, a(n) = (1/2)*(2 + ((A056239(n)+A243503(n))^2) - A056239(n) - 3*A243503(n)).

A328469 Lexicographically earliest infinite sequence such that a(i) = a(j) => A020639(i) = A020639(j) and A046523(i) = A046523(j) for all i, j.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 6, 10, 11, 12, 6, 13, 14, 15, 11, 16, 11, 13, 6, 17, 18, 19, 6, 20, 11, 21, 22, 23, 24, 13, 6, 25, 26, 27, 6, 13, 18, 28, 22, 29, 11, 30, 6, 31, 32, 33, 11, 13, 11, 34, 18, 25, 18, 13, 6, 35, 36, 37, 6, 30, 38, 25, 22, 39, 11, 13, 22, 40, 41, 42, 6, 30, 11, 43, 22, 44, 32, 45, 6, 46, 36, 25, 6, 13, 18, 47, 36, 43, 11, 13, 6, 25, 48, 49, 11, 30, 26, 50, 22, 51, 18, 52
Offset: 1

Views

Author

Antti Karttunen, Oct 19 2019

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A020639(n), A046523(n)], where A020639(n) gives the smallest prime factor of n, while A046523(n) gives the prime signature of n.
For all i, j: a(i) = a(j) => A291761(i) = A291761(j).

Crossrefs

Programs

  • PARI
    up_to = 100000;
    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; };
    A020639(n) = if(n>1, if(n>n=factor(n, 0)[1, 1], n, factor(n)[1, 1]), 1);
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
    Aux328469(n) = [A020639(n), A046523(n)];
    v328469 = rgs_transform(vector(up_to, n, Aux328469(n)));
    A328469(n) = v328469[n];
Showing 1-4 of 4 results.