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 11 results. Next

A110969 Length of the runs of ones in A014963.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 3, 1, 1, 1, 1, 4, 3, 1, 3, 1, 3, 5, 1, 2, 2, 3, 1, 5, 1, 1, 5, 7, 3, 1, 3, 1, 3, 7, 3, 1, 2, 5, 1, 9, 1, 5, 5, 3, 1, 3, 5, 1, 9, 1, 3, 1, 11, 11, 3, 1, 3, 5, 1, 1, 7, 4, 5, 5, 1, 5, 3, 1, 5, 3, 13, 3, 1, 3, 13, 5, 5, 3, 1, 3, 5, 1, 5, 5, 5, 3, 5, 7, 3, 7
Offset: 1

Views

Author

Franz Vrabec, Sep 27 2005

Keywords

Comments

Unbounded sequence.
From A373669 we see that 10 first appears at a(28195574) = 10.
Also run-lengths of non-prime-powers (assuming 1 is not a prime-power), where a run of a sequence (in this case A361102) is an interval of positions at which consecutive terms differ by one. Also nonzero differences of consecutive prime-powers minus one. - Gus Wiseman, Jun 18 2024

Examples

			a(5)=2 because the fifth run of ones in A014963 is of length 2.
		

Crossrefs

Cf. A014963.
Positions of first appearances are A373670, sorted A373669.
For runs of prime-powers:
- length A174965, antiruns A373671
- min A373673, antiruns A120430
- max A373674, antiruns A006549
- sum A373675, antiruns A373576
For runs of non-prime-powers:
- length A110969 (this sequence), antiruns A373672
- min A373676, antiruns A373575
- max A373677, antiruns A255346
- sum A373678, antiruns A373679
A000961 lists all powers of primes. A246655 lists just prime-powers.
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).
Various run-lengths: A053797, A120992, A175632, A176246.
Various antirun-lengths: A027833, A373127, A373403, A373409.

Programs

  • Mathematica
    Length /@ SplitBy[Table[Exp[MangoldtLambda[n]], {n, 400}], # != 1 &][[ ;; -1 ;; 2]] (* Michael De Vlieger, Mar 21 2024 *)
    DeleteCases[Differences[Select[Range[100],PrimePowerQ]]-1,0] (* Gus Wiseman, Jun 18 2024 *)
  • PARI
    \\ b(n) returns boolean of A014963(n) == 1.
    b(n)={my(t); !isprime(if(ispower(n, ,&t), t, n))}
    seq(n)={my(k=1, i=0, L=List()); while(#Lk, listput(L, i-k)); k = i+1)); Vec(L)} \\ Andrew Howroyd, Jan 02 2020

Extensions

Terms a(41) and beyond from Andrew Howroyd, Jan 02 2020

A373672 Length of the n-th maximal antirun of non-prime-powers.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jun 14 2024

Keywords

Comments

An antirun of a sequence (in this case A361102 or A024619 with 1) 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
		

Crossrefs

For prime antiruns we have A027833.
For nonsquarefree runs we have A053797, firsts A373199.
For non-prime-powers runs we have A110969, firsts A373669, sorted A373670.
For squarefree runs we have A120992.
For prime-power runs we have A174965.
For prime runs we have A175632.
For composite runs we have A176246, firsts A073051, sorted A373400.
For squarefree antiruns we have A373127, firsts A373128.
For composite antiruns we have A373403.
For antiruns of prime-powers:
- length A373671
- min A120430
- max A006549
For antiruns of non-prime-powers:
- length A373672 (this sequence), firsts (3,7,2,25,1,4)
- min A373575
- max A255346
A000961 lists all powers of primes. A246655 lists just prime-powers.
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
    Length/@Split[Select[Range[100],!PrimePowerQ[#]&],#1+1!=#2&]//Most

Formula

Partial sums are A356068(A255346(n)).

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

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

A373575 Numbers k such that k and k-1 both have at least two distinct prime factors. First element of the n-th maximal antirun of non-prime-powers.

Original entry on oeis.org

1, 15, 21, 22, 34, 35, 36, 39, 40, 45, 46, 51, 52, 55, 56, 57, 58, 63, 66, 69, 70, 75, 76, 77, 78, 85, 86, 87, 88, 91, 92, 93, 94, 95, 96, 99, 100, 105, 106, 111, 112, 115, 116, 117, 118, 119, 120, 123, 124, 130, 133, 134, 135, 136, 141, 142, 143, 144, 145
Offset: 1

Views

Author

Gus Wiseman, Jun 18 2024

Keywords

Comments

The last element of the same antirun is given by A255346.
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
		

Crossrefs

Runs of prime-powers:
- length A174965
- min A373673
- max A373674
- sum A373675
Runs of non-prime-powers:
- length A110969
- min A373676
- max A373677
- sum A373678
Antiruns of prime-powers:
- length A373671
- min A120430
- max A006549
- sum A373576
Antiruns of non-prime-powers:
- length A373672
- min A373575 (this sequence)
- max A255346
- sum A373679
A000961 lists all powers of primes. A246655 lists just prime-powers.
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).
Various run-lengths: A053797, A120992, A175632, A176246.
Various antirun-lengths: A027833, A373127, A373403, A373409.

Programs

  • Mathematica
    Select[Range[100],!PrimePowerQ[#]&&!PrimePowerQ[#-1]&]
    Join[{1},SequencePosition[Table[If[PrimeNu[n]>1,1,0],{n,150}],{1,1}][[;;,2]]] (* Harvey P. Dale, Feb 23 2025 *)

A085970 Number of integers ranging from 2 to n that are not prime-powers.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Jul 06 2003

Keywords

Comments

For n > 2, a(n) gives the number of duplicate eliminations performed by the Sieve of Eratosthenes when sieving the interval [2, n]. - Felix Fröhlich, Dec 10 2016
Number of terms of A024619 <= n. - Felix Fröhlich, Dec 10 2016
First differs from A082997 at n = 30. - Gus Wiseman, Jul 28 2022

Examples

			The a(30) = 13 numbers: 6, 10, 12, 14, 15, 18, 20, 21, 22, 24, 26, 28, 30. - _Gus Wiseman_, Jul 28 2022
		

Crossrefs

The complement is counted by A065515, without 1's A025528.
For primes instead of prime-powers we have A065855, with 1's A062298.
Partial sums of A143731.
The version not treating 1 as a prime-power is A356068.
A000688 counts factorizations into prime-powers.
A001222 counts prime-power divisors.
A246655 lists the prime-powers (A000961 includes 1), towers A164336.

Programs

  • Mathematica
    With[{nn = 75}, Table[n - Count[#, k_ /; k < n] - 1, {n, nn}] &@ Join[{1}, Select[Range@ nn, PrimePowerQ]]] (* Michael De Vlieger, Dec 11 2016 *)
  • PARI
    a(n) = my(i=0); forcomposite(c=4, n, if(!isprimepower(c), i++)); i \\ Felix Fröhlich, Dec 10 2016
    
  • Python
    from sympy import primepi, integer_nthroot
    def A085970(n): return n-1-sum(primepi(integer_nthroot(n,k)[0]) for k in range(1,n.bit_length())) # Chai Wah Wu, Aug 20 2024

Formula

a(n) = Max{A024619(k)<=n} k;
a(n) = n - A065515(n) = A085972(n) - A000720(n).

Extensions

Name modified by Gus Wiseman, Jul 28 2022. Normally 1 is not considered a prime-power, cf. A000961, A246655.

A373669 Least k such that the k-th maximal run of non-prime-powers has length n. Position of first appearance of n in A110969, and the sequence ends if there is none.

Original entry on oeis.org

1, 5, 7, 12, 18, 190, 28, 109, 40, 28195574, 53
Offset: 1

Views

Author

Gus Wiseman, Jun 14 2024

Keywords

Comments

A run of a sequence (in this case A361102) is an interval of positions at which consecutive terms differ by one.
Are there only 9 terms?
From David A. Corneth, Jun 14 2024: (Start)
No. a(10) exists.
Between the prime 144115188075855859 and 144115188075855872 = 2^57 there are 12 non-prime-powers so a(12) exists. (End)

Examples

			The maximal runs 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
		

Crossrefs

For composite runs we have A073051, sorted A373400, firsts of A176246.
For squarefree runs we have firsts of A120992.
For prime-powers runs we have firsts of A174965.
For prime runs we have firsts of A251092 or A175632.
For squarefree antiruns we have A373128, firsts of A373127.
For nonsquarefree runs we have A373199, firsts of A053797.
The sorted version is A373670.
For antiruns we have firsts of A373672.
For runs of non-prime-powers:
- length A110969
- min A373676
- max A373677
- sum A373678
A000961 lists the powers of primes (including 1).
A005117 lists the squarefree numbers, first differences A076259.
A013929 lists the nonsquarefree numbers, first differences A078147.
A057820 gives first differences of consecutive prime-powers, gaps A093555.
A112798 lists prime indices, reverse A296150, length A001222, sum A056239.
A361102 lists the non-prime-powers, without 1 A024619.

Programs

  • Mathematica
    q=Length/@Split[Select[Range[10000],!PrimePowerQ[#]&],#1+1==#2&]//Most;
    spna[y_]:=Max@@Select[Range[Length[y]],SubsetQ[y,Range[#1]]&];
    Table[Position[q,k][[1,1]],{k,spna[q]}]

A373670 Numbers k such that the k-th run-length A110969(k) of the sequence of non-prime-powers (A024619) is different from all prior run-lengths.

Original entry on oeis.org

1, 5, 7, 12, 18, 28, 40, 53, 71, 109, 170, 190, 198, 207, 236, 303, 394, 457, 606, 774, 1069, 1100, 1225, 1881, 1930, 1952, 2247, 2281, 3140, 3368, 3451, 3493, 3713, 3862, 4595, 4685, 6625, 8063, 8121, 8783, 12359, 12650, 14471, 14979, 15901, 17129, 19155
Offset: 1

Views

Author

Gus Wiseman, Jun 15 2024

Keywords

Comments

The unsorted version is A373669.

Examples

			The maximal runs 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
So the a(n)-th runs begin:
   1
  14  15
  20  21  22
  33  34  35  36
  54  55  56  57  58
		

Crossrefs

For nonsquarefree runs we have A373199 (if increasing), firsts of A053797.
For squarefree antiruns see A373200, unsorted A373128, firsts of A373127.
For composite runs we have A373400, unsorted A073051, firsts of A176246.
For prime antiruns we have A373402.
For runs of non-prime-powers:
- length A110969, firsts A373669, sorted A373670 (this sequence):
- min A373676
- max A373677
- sum A373678
For runs of prime-powers:
- length A174965
- min A373673
- max A373674
- sum A373675
A000961 lists the powers of primes (including 1).
A057820 gives first differences of consecutive prime-powers, gaps A093555.
A361102 lists the non-prime-powers, without 1 A024619.

Programs

  • Mathematica
    t=Length/@Split[Select[Range[10000],!PrimePowerQ[#]&],#1+1==#2&];
    Select[Range[Length[t]],FreeQ[Take[t,#-1],t[[#]]]&]

A378367 Greatest non prime power <= n, allowing 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 6, 6, 6, 6, 10, 10, 12, 12, 14, 15, 15, 15, 18, 18, 20, 21, 22, 22, 24, 24, 26, 26, 28, 28, 30, 30, 30, 33, 34, 35, 36, 36, 38, 39, 40, 40, 42, 42, 44, 45, 46, 46, 48, 48, 50, 51, 52, 52, 54, 55, 56, 57, 58, 58, 60, 60, 62, 63, 63, 65, 66, 66
Offset: 1

Views

Author

Gus Wiseman, Nov 29 2024

Keywords

Comments

Non prime powers allowing 1 (A361102) are numbers that are not a prime power (A246655), namely 1, 6, 10, 12, 14, 15, 18, 20, 21, 22, 24, ...

Examples

			The greatest non prime power <= 7 is 6, so a(7) = 6.
		

Crossrefs

Sequences obtained by subtracting each term from n are placed in parentheses below.
For prime we have A007917 (A064722).
For nonprime we have A179278 (A010051 almost).
For perfect power we have A081676 (A069584).
For squarefree we have A070321.
For nonsquarefree we have A378033.
For non perfect power we have A378363.
The opposite is A378372, subtracting n A378371.
For prime power we have A031218 (A276781 - 1).
Subtracting from n gives (A378366).
A000015 gives the least prime power >= n (A378370).
A000040 lists the primes, differences A001223.
A000961 and A246655 list the prime powers, differences A057820.
A024619 and A361102 list the non prime powers, differences A375708 and A375735.
A151800 gives the least prime > n (A013632), weak version A007918 (A007920).
Prime powers between primes: A053607, A080101, A304521, A366833, A377057.
Cf. A356068.

Programs

  • Mathematica
    Table[NestWhile[#-1&,n,PrimePowerQ[#]&],{n,100}]

Formula

a(n) = n - A378366(n).
a(n) = A361102(A356068(n)). - Ridouane Oudra, Aug 22 2025

A378615 Number of non prime powers <= prime(n).

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 6, 7, 10, 13, 14, 18, 21, 22, 25, 29, 34, 35, 39, 42, 43, 48, 50, 55, 62, 65, 66, 69, 70, 73, 84, 86, 91, 92, 101, 102, 107, 112, 115, 119, 124, 125, 134, 135, 138, 139, 150, 161, 164, 165, 168, 173, 174, 182, 186, 191, 196, 197, 202, 205
Offset: 1

Views

Author

Gus Wiseman, Dec 06 2024

Keywords

Examples

			The non prime powers counted under each term:
  n=1  n=2  n=3  n=4  n=5  n=6  n=7  n=8  n=9  n=10
  -------------------------------------------------
   1    1    1    6   10   12   15   18   22   28
                  1    6   10   14   15   21   26
                       1    6   12   14   20   24
                            1   10   12   18   22
                                 6   10   15   21
                                 1    6   14   20
                                      1   12   18
                                          10   15
                                           6   14
                                           1   12
                                               10
                                                6
                                                1
		

Crossrefs

Restriction of A356068 (first-differences A143731).
First-differences are A368748.
Maxima are A378616.
Other classes of numbers (instead of non prime powers):
- prime: A000027 (diffs A000012), restriction of A000720 (diffs A010051)
- squarefree: A071403 (diffs A373198), restriction of A013928 (diffs A008966)
- nonsquarefree: A378086 (diffs A061399), restriction of A057627 (diffs A107078)
- prime power: A027883 (diffs A366833), restriction of A025528 (diffs A010055)
- composite: A065890 (diffs A046933), restriction of A065855 (diffs A005171)
A000040 lists the primes, differences A001223
A000961 and A246655 list the prime powers, differences A057820.
A024619 lists the non prime powers, differences A375735, seconds A376599.
A080101 counts prime powers between primes (exclusive), inclusive A366833.
A361102 lists the non powers of primes, differences A375708.

Programs

  • Mathematica
    Table[Length[Select[Range[Prime[n]],Not@*PrimePowerQ]],{n,100}]
  • Python
    from sympy import prime, primepi, integer_nthroot
    def A378615(n): return int((p:=prime(n))-n-sum(primepi(integer_nthroot(p,k)[0]) for k in range(2,p.bit_length()))) # Chai Wah Wu, Dec 07 2024

Formula

a(n) = prime(n) - A027883(n). - Chai Wah Wu, Dec 08 2024
Showing 1-10 of 11 results. Next