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-10 of 12 results. Next

A373198 Number of squarefree numbers from prime(n) to prime(n+1) - 1.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, May 29 2024

Keywords

Examples

			This is the sequence of row-lengths of A005117 treated as a triangle with row-sums A373197:
   2
   3
   5   6
   7  10
  11
  13  14  15
  17
  19  21  22
  23  26
  29  30
  31  33  34  35
  37  38  39
  41  42
  43  46
  47  51
  53  55  57  58
		

Crossrefs

Counting all numbers (not just squarefree) gives A001223, sum A371201.
For composite instead of squarefree we have A046933.
For squarefree numbers (A005117) between primes:
- sum is A373197
- length is A373198 (this sequence) = A061398 - 1
- min is A000040
- max is A112925, opposite A112926
For squarefree numbers between powers of two:
- sum is A373123
- length is A077643, partial sums A143658
- min is A372683, delta A373125, indices A372540, firsts of A372475
- max is A372889, delta A373126
For primes between powers of two:
- sum is A293697 (except initial terms)
- length is A036378
- min is A104080 or A014210, indices A372684 (firsts of A035100)
- max is A014234, delta A013603
Cf. A372473 (firsts of A372472), A372541 (firsts of A372433).

Programs

  • Mathematica
    Table[Length[Select[Range[Prime[n],Prime[n+1]-1],SquareFreeQ]],{n,100}]
  • Python
    from math import isqrt
    from sympy import prime, nextprime, mobius
    def A373198(n):
        p = prime(n)
        q = nextprime(p)
        r = isqrt(p-1)+1
        return sum(mobius(k)*((q-1)//k**2) for k in range(r,isqrt(q-1)+1))+sum(mobius(k)*((q-1)//k**2-(p-1)//k**2) for k in range(1,r)) # Chai Wah Wu, Jun 01 2024

Formula

a(n) = A061398(n) + 1.

A373576 Sums of maximal antiruns of prime-powers.

Original entry on oeis.org

2, 3, 4, 12, 8, 49, 171, 2032, 5157, 3997521, 199713082, 561678378, 10122001905, 109934112352390774
Offset: 1

Views

Author

Gus Wiseman, Jun 17 2024

Keywords

Comments

An antirun of a sequence (in this case A246655) is an interval of positions at which consecutive terms differ by more than one.

Examples

			The maximal antiruns of powers of primes begin:
   2
   3
   4
   5   7
   8
   9  11  13  16
  17  19  23  25  27  29  31
		

Crossrefs

See link for composite, prime, nonsquarefree, and squarefree runs/antiruns.
Prime-power runs: A373675, min A373673, max A373674, length A174965.
Non-prime-power runs: A373678, min A373676, max A373677, length A110969.
Prime-power antiruns: A373576 (this sequence), min A120430, max A006549, length A373671.
Non-prime-power antiruns: A373679, min A373575, max A255346, length A373672.
A000040 lists the primes, differences A001223.
A000961 lists all powers of primes. A246655 lists just prime-powers.
A025528 counts prime-powers up to n.
A057820 gives first differences of consecutive prime-powers, gaps A093555.
A356068 counts non-prime-powers up to n.
A361102 lists all non-prime-powers (A024619 if not including 1).

Programs

  • Mathematica
    Total/@Split[Select[Range[1000],PrimePowerQ],#1+1!=#2&]//Most

Extensions

a(14) from Giorgos Kalogeropoulos, Jun 18 2024

A373675 Sums of maximal runs of powers of primes A000961.

Original entry on oeis.org

15, 24, 11, 13, 33, 19, 23, 25, 27, 29, 63, 37, 41, 43, 47, 49, 53, 59, 61, 64, 67, 71, 73, 79, 81, 83, 89, 97, 101, 103, 107, 109, 113, 121, 125, 255, 131, 137, 139, 149, 151, 157, 163, 167, 169, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239
Offset: 1

Views

Author

Gus Wiseman, Jun 16 2024

Keywords

Comments

A run of a sequence (in this case A000961) is an interval of positions at which consecutive terms differ by one.

Examples

			The maximal runs of powers of primes begin:
   1   2   3   4   5
   7   8   9
  11
  13
  16  17
  19
  23
  25
  27
  29
  31  32
  37
  41
  43
  47
  49
		

Crossrefs

A000040 lists the primes, differences A001223.
A000961 lists all powers of primes (A246655 if not including 1).
A025528 counts prime-powers up to n.
A057820 gives first differences of consecutive prime-powers, gaps A093555.
A361102 lists all non-prime-powers (A024619 if not including 1).
See link for composite, prime, nonsquarefree, and squarefree runs.
Prime-power runs: A373675, min A373673, max A373674, length A174965.
Non-prime-power runs: A373678, min A373676, max A373677, length A110969.
Prime-power antiruns: A373576, min A120430, max A006549, length A373671.
Non-prime-power antiruns: A373679, min A373575, max A255346, length A373672.

Programs

  • Mathematica
    pripow[n_]:=n==1||PrimePowerQ[n];
    Total/@Split[Select[Range[nn],pripow],#1+1==#2&]//Most

A373679 Sums of maximal antiruns of non-prime-powers.

Original entry on oeis.org

43, 53, 21, 163, 34, 35, 74, 39, 126, 45, 144, 51, 106, 55, 56, 57, 180, 128, 134, 69, 216, 75, 76, 77, 324, 85, 86, 87, 178, 91, 92, 93, 94, 95, 194, 99, 306, 105, 324, 111, 226, 115, 116, 117, 118, 119, 242, 123, 379, 262, 133, 134, 135, 414, 141, 142, 143
Offset: 1

Views

Author

Gus Wiseman, Jun 17 2024

Keywords

Comments

An antirun of a sequence (in this case A361102) is an interval of positions at which consecutive terms differ by more than one.

Examples

			The maximal antiruns of non-prime-powers begin:
   1   6  10  12  14
  15  18  20
  21
  22  24  26  28  30  33
  34
  35
  36  38
  39
  40  42  44
  45
  46  48  50
  51
  52  54
  55
  56
  57
  58  60  62
  63  65
		

Crossrefs

See link for composite, prime, nonsquarefree, and squarefree runs/antiruns.
Prime-power runs: A373675, min A373673, max A373674, length A174965.
Non-prime-power runs: A373678, min A373676, max A373677, length A110969.
Prime-power antiruns: A373576, min A120430, max A006549, length A373671.
Non-prime-power antiruns: A373679 (this sequence), min A373575, max A255346, length A373672.
A000040 lists the primes, differences A001223.
A000961 lists all powers of primes. A246655 lists just prime-powers.
A025528 counts prime-powers up to n.
A057820 gives first differences of consecutive prime-powers, gaps A093555.
A356068 counts non-prime-powers up to n.
A361102 lists all non-prime-powers (A024619 if not including 1).

Programs

  • Mathematica
    Total/@Split[Select[Range[100],!PrimePowerQ[#]&],#1+1!=#2&]//Most

A073051 Least k such that Sum_{i=1..k} (prime(i) + prime(i+2) - 2*prime(i+1)) = 2n + 1.

Original entry on oeis.org

1, 3, 8, 23, 33, 45, 29, 281, 98, 153, 188, 262, 366, 428, 589, 737, 216, 1182, 3301, 2190, 1878, 1830, 7969, 3076, 3426, 2224, 3792, 8027, 4611, 4521, 3643, 8687, 14861, 12541, 15782, 3384, 34201, 19025, 17005, 44772, 23282, 38589, 14356
Offset: 1

Views

Author

Robert G. Wilson v, Aug 15 2002

Keywords

Comments

Also, least k such that 2n = A001223(k-1) = prime(k+1) - prime(k), where prime(k) = A001223(n). - Alexander Adamchuk, Jul 30 2006
Also the least number k>0 such that the k-th maximal run of composite numbers has length 2n-1. For example, the 8th such run (24,25,26,27,28) is the first of length 2(3)-1, so a(3) = 8. Also positions of first appearances in A176246 (A046933 without first term). - Gus Wiseman, Jun 12 2024

Examples

			a(3) = 8 because 1+0+2-2+2-2+2+2 = 5 and (5+1)/2 = 3.
		

Crossrefs

Position of first appearance of 2n+1 in A176246.
For nonsquarefree runs we have a bisection of A373199.
A000040 lists the primes, first differences A001223.
A002808 lists the composite numbers, differences A073783, sums A053767.
A046933 counts composite numbers between primes.
A065855 counts composite numbers up to n.

Programs

  • Mathematica
    NextPrim[n_Integer] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; a = Table[0, {50}]; s = 0; k = 1; p = 0; q = 2; r = 3; While[k < 10^6, p = q; q = r; r = NextPrim[q]; s = s + p + r - 2q; If[s < 101 && a[[(s + 1)/2]] == 0, a[[(s + 1)/2]] = k]; k++ ]; a
  • PARI
    a001223(n) = prime(n+1) - prime(n);
    a(n) = {my(k = 1); while(2*n != A001223(k+1), k++); k;} \\ Michel Marcus, Nov 20 2016

Formula

a(n) = A038664(n) - 1. - Filip Zaludek, Nov 19 2016

A373197 Sum of all squarefree numbers from prime(n) to prime(n+1) - 1.

Original entry on oeis.org

2, 3, 11, 17, 11, 42, 17, 62, 49, 59, 133, 114, 83, 89, 98, 223, 59, 254, 206, 71, 302, 161, 341, 462, 97, 203, 314, 107, 330, 824, 386, 398, 275, 856, 149, 460, 635, 494, 337, 702, 179, 1294, 191, 582, 197, 1635, 1950, 449, 227, 690, 943, 239, 983, 1013, 1036
Offset: 1

Views

Author

Gus Wiseman, May 29 2024

Keywords

Examples

			This is the sequence of row sums of A005117 treated as a triangle with row-lengths A373198:
   2
   3
   5   6
   7  10
  11
  13  14  15
  17
  19  21  22
  23  26
  29  30
  31  33  34  35
  37  38  39
  41  42
  43  46
  47  51
  53  55  57  58
		

Crossrefs

Counting all numbers (not just squarefree) gives A371201.
For the sectioning of A005117 (squarefree between prime):
- sum is A373197 (this sequence)
- length is A373198 = A061398 - 1
- min is A000040
- max is A112925, opposite A112926
For squarefree numbers between powers of two:
- sum is A373123
- length is A077643, partial sums A143658
- min is A372683, delta A373125, indices A372540, firsts of A372475
- max is A372889, delta A373126
For primes between powers of two:
- sum is A293697 (except initial terms)
- length is A036378
- min is A104080 or A014210, indices A372684 (firsts of A035100)
- max is A014234, delta A013603
Cf. A372473 (firsts of A372472), A372541 (firsts of A372433).

Programs

  • Mathematica
    Table[Total[Select[Range[Prime[n],Prime[n+1]-1],SquareFreeQ]],{n,15}]

A373678 Sums of maximal runs of non-prime-powers.

Original entry on oeis.org

1, 6, 10, 12, 29, 18, 63, 24, 26, 28, 30, 138, 117, 42, 135, 48, 153, 280, 60, 125, 131, 207, 72, 380, 80, 82, 430, 651, 297, 102, 315, 108, 333, 819, 369, 126, 259, 670, 138, 1296, 150, 770, 800, 495, 168, 513, 880, 180, 1674, 192, 585, 198, 2255, 2387, 675
Offset: 1

Views

Author

Gus Wiseman, Jun 16 2024

Keywords

Comments

We consider 1 to be a power of a prime and a non-prime-power, but not a prime-power.
A run of a sequence (in this case A361102) is an interval of positions at which consecutive terms differ by one.

Examples

			The maximal runs of non-powers of primes begin:
   1
   6
  10
  12
  14  15
  18
  20  21  22
  24
  26
  28
  30
  33  34  35  36
  38  39  40
  42
  44  45  46
  48
  50  51  52
  54  55  56  57  58
  60
		

Crossrefs

A000040 lists the primes, differences A001223.
A000961 lists all powers of primes (A246655 if not including 1).
A025528 counts prime-powers up to n.
A057820 gives first differences of consecutive prime-powers, gaps A093555.
A361102 lists all non-prime-powers (A024619 if not including 1).
See link for composite, prime, nonsquarefree, and squarefree runs.
Prime-power runs: A373675, min A373673, max A373674, length A174965.
Non-prime-power runs: A373678, min A373676, max A373677, length A110969.
Prime-power antiruns: A373576, min A120430, max A006549, length A373671.
Non-prime-power antiruns: A373679, min A373575, max A255346, length A373672.

Programs

  • Mathematica
    Total/@Split[Select[Range[100],!PrimePowerQ[#]&],#1+1==#2&]//Most

A373404 Sum of the n-th maximal antirun of composite numbers differing by more than one.

Original entry on oeis.org

18, 9, 36, 15, 54, 21, 46, 25, 26, 27, 90, 33, 34, 35, 74, 39, 126, 45, 94, 49, 50, 51, 106, 55, 56, 57, 180, 63, 64, 65, 134, 69, 216, 75, 76, 77, 158, 81, 166, 85, 86, 87, 178, 91, 92, 93, 94, 95, 194, 99, 306, 105, 324, 111, 226, 115, 116, 117, 118, 119
Offset: 1

Views

Author

Gus Wiseman, Jun 05 2024

Keywords

Comments

The length of this antirun is given by A373403.
An antirun of a sequence (in this case A002808) is an interval of positions at which consecutive terms differ by more than one.

Examples

			Row sums of:
   4   6   8
   9
  10  12  14
  15
  16  18  20
  21
  22  24
  25
  26
  27
  28  30  32
  33
  34
  35
  36  38
  39
  40  42  44
		

Crossrefs

Partial sums are a subset of A053767 (partial sums of composite numbers).
Functional neighbors: A005381, A054265, A068780, A373403, A373405, A373411, A373412.
A000040 lists the primes, differences A001223.
A002808 lists the composite numbers, differences A073783.
A046933 counts composite numbers between primes.
A065855 counts composite numbers up to n.

Programs

  • Mathematica
    Total/@Split[Select[Range[100],CompositeQ],#1+1!=#2&]//Most

A373405 Sum of the n-th maximal antirun of odd primes differing by more than two.

Original entry on oeis.org

3, 5, 18, 30, 71, 109, 202, 199, 522, 210, 617, 288, 990, 372, 390, 860, 701, 1281, 829, 1194, 1645, 4578, 852, 2682, 4419, 3300, 2927, 2438, 1891, 2602, 14660, 1632, 1650, 3378, 3480, 18141, 2052, 3121, 2112, 4310, 8922, 13131, 6253, 3851, 3889, 3929, 13788
Offset: 1

Views

Author

Gus Wiseman, Jun 05 2024

Keywords

Comments

The length of this run is given by A027833 (except initial term).
An antirun of a sequence (in this case A000040\{2}) is an interval of positions at which consecutive terms differ by more than one.

Examples

			Row-sums of:
   3
   5
   7  11
  13  17
  19  23  29
  31  37  41
  43  47  53  59
  61  67  71
  73  79  83  89  97 101
		

Crossrefs

The partial sums are a subset of A071148 (partial sums of odd primes).
Functional neighbors: A001359, A006512, A027833 (partial sums A029707), A373404, A373406, A373411, A373412.
A000040 lists the primes, differences A001223.
A002808 lists the composite numbers, differences A073783.

Programs

  • Mathematica
    Total/@Split[Select[Range[3,1000],PrimeQ],#1+2!=#2&]//Most

A373406 Sum of the n-th maximal run of odd primes differing by two.

Original entry on oeis.org

15, 24, 36, 23, 60, 37, 84, 47, 53, 120, 67, 144, 79, 83, 89, 97, 204, 216, 113, 127, 131, 276, 300, 157, 163, 167, 173, 360, 384, 396, 211, 223, 456, 233, 480, 251, 257, 263, 540, 277, 564, 293, 307, 624, 317, 331, 337, 696, 353, 359, 367, 373, 379, 383
Offset: 1

Views

Author

Gus Wiseman, Jun 05 2024

Keywords

Comments

The length of this run is given by A251092.
For this sequence we define a run to be an interval of positions at which consecutive terms differ by two. Normally, a run has consecutive terms differing by one, but odd prime numbers already differ by at least two.
Contains A054735 (sums of twin prime pairs) without its first two terms and A007510 (non-twin primes) as subsequences. - R. J. Mathar, Jun 07 2024

Examples

			Row-sums of:
   3   5   7
  11  13
  17  19
  23
  29  31
  37
  41  43
  47
  53
  59  61
  67
  71  73
  79
  83
  89
  97
		

Crossrefs

The partial sums are a subset of A071148 (partial sums of odd primes).
Functional neighbors: A025584, A054265, A067774, A251092 (or A175632), A373405, A373413, A373414.
A000040 lists the primes, differences A001223.
A046933 counts composite numbers between primes.
A065855 counts composite numbers up to n.

Programs

  • Mathematica
    Total/@Split[Select[Range[3,100],PrimeQ],#1+2==#2&]//Most
Showing 1-10 of 12 results. Next