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-20 of 43 results. Next

A356069 Number of divisors of n whose prime indices cover an interval of positive integers (A073491).

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 2, 4, 3, 3, 2, 6, 2, 3, 4, 5, 2, 6, 2, 4, 3, 3, 2, 8, 3, 3, 4, 4, 2, 7, 2, 6, 3, 3, 4, 9, 2, 3, 3, 5, 2, 5, 2, 4, 6, 3, 2, 10, 3, 4, 3, 4, 2, 8, 3, 5, 3, 3, 2, 10, 2, 3, 4, 7, 3, 5, 2, 4, 3, 5, 2, 12, 2, 3, 6, 4, 4, 5, 2, 6, 5, 3, 2, 7, 3, 3
Offset: 1

Views

Author

Gus Wiseman, Aug 28 2022

Keywords

Comments

First differs from A000005 at 10, 14, 20, 21, 22, ... = A307516.
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The a(n) counted divisors of n = 1, 2, 4, 6, 12, 16, 24, 30, 36, 48, 72, 90:
  1   2   4   6  12  16  24  30  36  48  72  90
      1   2   3   6   8  12  15  18  24  36  45
          1   2   4   4   8   6  12  16  24  30
              1   3   2   6   5   9  12  18  18
                  2   1   4   3   6   8  12  15
                  1       3   2   4   6   9   9
                          2   1   3   4   8   6
                          1       2   3   6   5
                                  1   2   4   3
                                      1   3   2
                                          2   1
                                          1
		

Crossrefs

These divisors belong to A073491, a superset of A055932, complement A073492.
The initial case is A356224.
The complement in the initial case is counted by A356225.
A000005 counts divisors.
A001223 lists the prime gaps.
A056239 adds up prime indices, row sums of A112798, lengths A001222.
A328338 has third-largest divisor prime.
A356226 gives the lengths of maximal gapless intervals of prime indices.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    nogapQ[m_]:=m=={}||Union[m]==Range[Min[m],Max[m]];
    Table[Length[Select[Divisors[n],nogapQ[primeMS[#]]&]],{n,100}]

A356228 Greatest size of a gapless submultiset of the prime indices of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Aug 13 2022

Keywords

Comments

A sequence is gapless if it covers an unbroken interval of positive integers. For example, the multiset {2,3,5,5,6,9} has three maximal gapless intervals: {2,3}, {5,5,6}, {9}.
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The prime indices of 700 are {1,1,3,3,4}, with maximal gapless submultisets {1,1}, {3,3,4}, so a(700) = 3.
The prime indices of 18564 are {1,1,2,4,6,7}, with maximal gapless submultisets {1,1,2}, {4}, {6,7}, so a(18564) = 3.
		

Crossrefs

Positions of first appearances are A000079.
The maximal gapless submultisets are counted by A287170, firsts A066205.
These are the row-maxima of A356226, firsts A356232.
The smallest instead of greatest size is A356227.
A001221 counts distinct prime factors, with sum A001414.
A001222 counts prime factors with multiplicity.
A001223 lists the prime gaps, reduced A028334.
A003963 multiplies together the prime indices of n.
A056239 adds up prime indices, row sums of A112798.
A073491 lists numbers with gapless prime indices, cf. A073492-A073495.
A356069 counts gapless divisors.
A356224 counts even gapless divisors, complement A356225.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[If[n==1,0,Max@@Length/@Split[primeMS[n],#1>=#2-1&]],{n,100}]

Formula

a(n) = A333766(A356230(n)).
a(n) = A061395(A356231(n)).

A356227 Smallest size of a maximal gapless submultiset of the prime indices of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Aug 13 2022

Keywords

Comments

A sequence is gapless if it covers an unbroken interval of positive integers. For example, the multiset {2,3,5,5,6,9} has three maximal gapless submultisets: {2,3}, {5,5,6}, {9}.
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The prime indices of 18564 are {1,1,2,4,6,7}, with maximal gapless submultisets {1,1,2}, {4}, {6,7}, so a(18564) = 1.
		

Crossrefs

Positions of first appearances are A000079.
The maximal gapless submultisets are counted by A287170, firsts A066205.
These are the row-minima of A356226, firsts A356232.
The greatest instead of smallest size is A356228.
A001221 counts distinct prime factors, with sum A001414.
A001222 counts prime factors with multiplicity.
A001223 lists the prime gaps, reduced A028334.
A003963 multiplies together the prime indices of n.
A056239 adds up prime indices, row sums of A112798.
A073491 lists numbers with gapless prime indices, cf. A073492-A073495.
A356224 counts even gapless divisors, complement A356225.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[If[n==1,0,Min@@Length/@Split[primeMS[n],#1>=#2-1&]],{n,100}]

Formula

a(n) = A333768(A356230(n)).
a(n) = A055396(A356231(n)).

A104120 a(n) = (prime(n + 1) - prime(n))/2 (mod 2).

Original entry on oeis.org

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

Views

Author

Joseph L. Pe, Mar 06 2005

Keywords

Comments

Questions: Is s(n) = (1/n)*Sum_{i=2..n+1} a(i) > 1/2 for all n? Does s(n) --> 1/2?

Examples

			a(1) = (prime(2 + 1) - prime(2))/2 (mod 2) = (5 - 3)/2 (mod 2) = 1 mod 2 = 1.
		

Crossrefs

Sequences related to the differences between successive primes: A001223 (Delta(p)), A028334, A080378, A104120, A330556-A330561.

Programs

  • Mathematica
    Table[Mod[(Prime[i + 1] - Prime[i])/2, 2], {i, 2, 100}]
    Mod[(#[[2]]-#[[1]])/2,2]&/@Partition[Prime[Range[2,110]],2,1] (* Harvey P. Dale, Oct 01 2018 *)

A330556 a(n) = (number of primes p <= 2*n+1 with Delta(p) == 2 mod 4) - (number of primes p <= 2*n+1 with Delta(p) == 0 mod 4), where Delta(p) = nextprime(p) - p.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Dec 29 2019

Keywords

Comments

a(n) = A330557(n) - A330558(n).
Since Delta(prime(n)) grows roughly like log n, this probably changes sign infinitely often. When is the next time a(n) is zero, or the first time a(n) < 0 (if these values exist)?

Examples

			n=5, 2*n+1=11: there are three primes <= 11 with Delta(p) == 2 mod 4, namely 3,5,11; and one with Delta(p) == 0 mod 4, namely 7; so a(5) = 3-1 = 2.
		

Crossrefs

Sequences related to the differences between successive primes: A001223 (Delta(p)), A028334, A080378, A104120, A330556-A330561.

A330561 a(n) = number of primes p <= prime(n) with Delta(p) == 0 (mod 4), where Delta(p) = nextprime(p) - p.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Dec 30 2019

Keywords

Crossrefs

Cf. A098059.
Sequences related to the differences between successive primes: A001223 (Delta(p)), A028334, A080378, A104120, A330556, A330557, A330558, A330559, A330560.

Programs

  • Magma
    [#[p:p in PrimesInInterval(1,NthPrime(n))|IsIntegral((NextPrime(p)-p)/4)]:n in [1..80]]; // Marius A. Burtea, Dec 31 2019
  • Maple
    N:= 200: # for a(1)..a(N)
    P:= [seq(ithprime(i),i=1..N+1)]:
    Delta:= P[2..-1]-P[1..-2] mod 4:
    R:= map(charfcn[0],Delta):
    ListTools:-PartialSums(R); # Robert Israel, Dec 31 2019
  • Mathematica
    Accumulate[Map[Boole[Mod[#, 4] == 0]&, Differences[Prime[Range[100]]]]] (* Paolo Xausa, Feb 05 2024 *)

A093343 Primes of form (prime(n)^2 + prime(n+1)^2)/2.

Original entry on oeis.org

17, 37, 229, 2029, 14449, 22501, 25609, 28909, 32401, 42061, 57601, 72901, 116989, 176401, 181501, 265261, 304729, 324901, 378229, 462409, 497041, 695581, 804709, 1089961, 1299721, 1416109, 1664101, 1742401, 1932181, 1971241, 2712709, 2873029, 3062509, 3186229
Offset: 1

Views

Author

Giovanni Teofilatto, Apr 26 2004

Keywords

Comments

Except for the first term, all terms == 1 mod 6. - Zak Seidov, Dec 02 2009
Except 17, all terms == 1 mod 12. Primes of the form A028334(n+1)^2 + A024675(n)^2. - Thomas Ordowski, Jun 28 2013

Crossrefs

Cf. A103739.

Programs

  • Mathematica
    Select[Mean/@Partition[Prime[Range[500]]^2,2,1],PrimeQ] (* Harvey P. Dale, Jun 16 2021 *)

Formula

Conjecture: a(n) ~ A224888(n). - Thomas Ordowski, Jul 25 2013

Extensions

Corrected and extended by Rick L. Shepherd, Nov 24 2004

A330557 a(n) = number of primes p <= 2*n+1 with Delta(p) == 2 mod 4, where Delta(p) = nextprime(p) - p.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Dec 29 2019

Keywords

Crossrefs

Sequences related to the differences between successive primes: A001223 (Delta(p)), A028334, A080378, A104120, A330556-A330561.

Programs

  • Magma
    [#[p:p in PrimesInInterval(1,2*n+1)| (NextPrime(p)-p) mod 4 eq 2]:n in [0..80]]; // Marius A. Burtea, Dec 31 2019
  • Maple
    N:= 100: # for a(0)..a(N)
    P:= select(isprime, [seq(i,i=3..nextprime(2*N+1),2)]):
    Delta:= P[2..-1]-P[1..-2] mod 4:
    A:= Array(0..N): t:= 0: j:= 1:
    for n from 0 to N do
      m:= 2*n+1:
      if m = P[j] then t:= t + charfcn[2](Delta[j]); j:= j+1 fi;
      A[n]:= t
    od:
    convert(A,list); # Robert Israel, Dec 31 2019

A330558 a(n) = number of primes p <= 2*n+1 with Delta(p) == 0 mod 4, where Delta(p) = nextprime(p) - p.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Dec 29 2019

Keywords

Crossrefs

Sequences related to the differences between successive primes: A001223 (Delta(p)), A028334, A080378, A104120, A330556-A330561.

Programs

  • Magma
    [#[p:p in PrimesInInterval(1,2*n+1)| (NextPrime(p)-p) mod 4 eq 0]:n in [0..80]]; // Marius A. Burtea, Dec 31 2019
  • Maple
    N:= 100: # for a(0)..a(N)
    P:= select(isprime, [seq(i,i=3..nextprime(2*N+1),2)]):
    Delta:= P[2..-1]-P[1..-2] mod 4:
    A:= Array(0..N): t:= 0: j:= 1:
    for n from 0 to N do
    m:= 2*n+1:
    if m = P[j] then t:= t + charfcn[0](Delta[j]); j:= j+1 fi;
    A[n]:= t
    od:
    convert(A,list); # Robert Israel, Dec 31 2019

A005521 1 + (sum of first n odd primes - n)/2.

Original entry on oeis.org

1, 2, 4, 7, 12, 18, 26, 35, 46, 60, 75, 93, 113, 134, 157, 183, 212, 242, 275, 310, 346, 385, 426, 470, 518, 568, 619, 672, 726, 782, 845, 910, 978, 1047, 1121, 1196, 1274, 1355, 1438, 1524, 1613, 1703, 1798
Offset: 0

Views

Author

Keywords

Crossrefs

a(n+1) - 1 counts primorial intervals A065917.
Partial sums of A005521.

Formula

a(n+1) = a(n) + (prime(n+1) - 1)/2 for odd primes prime(n+1).
a(n+2) - 2*a(n+1) + a(n) = A028334(n). - Frank Ellermann
Previous Showing 11-20 of 43 results. Next