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

A141515 a(n) = phi(A067774(n)) where phi is Euler totient function.

Original entry on oeis.org

1, 6, 12, 18, 22, 30, 36, 42, 46, 52, 60, 66, 72, 78, 82, 88, 96, 102, 108, 112, 126, 130, 138, 150, 156, 162, 166, 172, 180, 192, 198, 210, 222, 228, 232, 240, 250, 256, 262, 270, 276, 282, 292, 306, 312, 316, 330, 336, 348, 352, 358, 366, 372, 378, 382, 388
Offset: 1

Views

Author

Giovanni Teofilatto, Aug 11 2008

Keywords

Comments

Count of numbers smaller than and coprime to p for primes p such that p + 2 is composite.
Subsequence of A006093.

Crossrefs

Cf A067774 (primes p such that p+2 is composite), A000010 (Euler totient function), A006093 (primes minus 1), A141426, A141427.

Programs

  • Magma
    [EulerPhi(p): p in PrimesUpTo(400) | not IsPrime(p+2)]; // Vincenzo Librandi, Feb 09 2018
  • Mathematica
    EulerPhi[#]&@Select[Prime@Range@80, !PrimeQ[# + 2] &] (* Vincenzo Librandi, Feb 09 2018 *)
  • PARI
    {forprime(p=2, 400, if(!isprime(p+2), print1(eulerphi(p), ",")))} \\ Klaus Brockhaus, Aug 31 2008
    

Extensions

Edited and a(1) = 1, a(12) = 66 inserted by Klaus Brockhaus, Aug 31 2008

A029707 Numbers n such that the n-th and the (n+1)-st primes are twin primes.

Original entry on oeis.org

2, 3, 5, 7, 10, 13, 17, 20, 26, 28, 33, 35, 41, 43, 45, 49, 52, 57, 60, 64, 69, 81, 83, 89, 98, 104, 109, 113, 116, 120, 140, 142, 144, 148, 152, 171, 173, 176, 178, 182, 190, 201, 206, 209, 212, 215, 225, 230, 234, 236, 253, 256, 262, 265, 268, 277
Offset: 1

Views

Author

N. J. A. Sloane, Dec 11 1999

Keywords

Comments

Numbers m such that prime(m)^2 == 1 mod (prime(m) + prime(m + 1)). - Zak Seidov, Sep 18 2013
First differences are A027833. The complement is A049579. - Gus Wiseman, Dec 03 2024

Crossrefs

Cf. A014574, A027833 (first differences), A007508. Equals PrimePi(A001359) (cf. A000720).
The complement is A049579, first differences A251092 except first term.
Lengths of runs of terms differing by 2 are A179067.
The first differences have run-lengths A373820 except first term.
A000040 lists the primes, differences A001223 (run-lengths A333254, A373821).
A038664 finds the first prime gap of 2n.
A046933 counts composite numbers between primes.
For prime runs: A005381, A006512, A025584, A067774.

Programs

  • Maple
    A029707 := proc(n)
        numtheory[pi](A001359(n)) ;
    end proc:
    seq(A029707(n),n=1..30); # R. J. Mathar, Feb 19 2017
  • Mathematica
    Select[ Range@300, PrimeQ[ Prime@# + 2] &] (* Robert G. Wilson v, Mar 11 2007 *)
    Flatten[Position[Flatten[Differences/@Partition[Prime[Range[100]],2,1]], 2]](* Harvey P. Dale, Jun 05 2014 *)
  • Sage
    def A029707(n) :
       a = [ ]
       for i in (1..n) :
          if (nth_prime(i+1)-nth_prime(i) == 2) :
             a.append(i)
       return(a)
    A029707(277) # Jani Melik, May 15 2014

Formula

a(n) = A107770(n) - 1. - Juri-Stepan Gerasimov, Dec 16 2009

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

A373671 Length of the n-th maximal antirun of prime-powers.

Original entry on oeis.org

1, 1, 1, 2, 1, 4, 7, 26, 27, 1007, 5558, 5734, 31209
Offset: 1

Views

Author

Gus Wiseman, Jun 14 2024

Keywords

Comments

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

Examples

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

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 (this sequence)
- min A120430
- max A006549
For antiruns of non-prime-powers:
- length A373672
- min A373575
- max A255346
A000961 lists the powers of primes (including 1).
A025528 counts prime-powers up to n.
A057820 gives first differences of consecutive prime-powers, gaps A093555.
A361102 lists the non-prime-powers (not including 1 A024619).

Programs

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

Formula

Partial sums are A025528(A006549(n)).

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

A164926 Least prime p such that x^2+x+p produces primes for x=0..n-1 and composite for x=n.

Original entry on oeis.org

2, 3, 107, 5, 347, 1607, 1277, 21557, 51867197, 11, 180078317, 1761702947, 8776320587, 27649987598537, 291598227841757, 17
Offset: 1

Views

Author

T. D. Noe, Sep 01 2009

Keywords

Comments

Other known values: a(16)=17 and a(40)=41 (which is generated by Euler's polynomial, A005846). There are no other terms less than 10^12. All of Euler's Lucky numbers, A014556, are in this sequence. Assuming the prime k-tuples conjecture, Mollin's theorem 2.1 shows this sequence is defined for n>0.
a(21)=234505015943235329417 found by J. Waldvogel and Peter Leikauf. [Jens Kruse Andersen, Sep 09 2009]

Crossrefs

Programs

  • Mathematica
    PrimeRun[p_Integer] := Module[{k=0}, While[PrimeQ[k^2+k+p], k++ ]; k]; nn=8; t=Table[0,{nn}]; cnt=0; p=1; While[cnt
    				

Extensions

a(14) and a(15) from Jens Kruse Andersen, Sep 09 2009

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 *)

A373673 First element of each maximal run of powers of primes (including 1).

Original entry on oeis.org

1, 7, 11, 13, 16, 19, 23, 25, 27, 29, 31, 37, 41, 43, 47, 49, 53, 59, 61, 64, 67, 71, 73, 79, 81, 83, 89, 97, 101, 103, 107, 109, 113, 121, 125, 127, 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 15 2024

Keywords

Comments

A run of a sequence (in this case A000961) is an interval of positions at which consecutive terms differ by one.
The last element of the same run is A373674.
Consists of all powers of primes k such that k-1 is not a power of primes.

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

For composite antiruns we have A005381, max A068780, length A373403.
For prime antiruns we have A006512, max A001359, length A027833.
For composite runs we have A008864, max A006093, length A176246.
For prime runs we have A025584, max A067774, length A251092 or A175632.
For runs of prime-powers:
- length A174965
- min A373673 (this sequence)
- max A373674
- sum A373675
For runs of non-prime-powers:
- length A110969 (firsts A373669, sorted A373670)
- min A373676
- max A373677
- sum A373678
For antiruns of prime-powers:
- length A373671
- min A120430
- max A006549
- sum A373576
For antiruns of non-prime-powers:
- length A373672
- min A373575
- max A255346
- sum A373679
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).

Programs

  • Mathematica
    pripow[n_]:=n==1||PrimePowerQ[n];
    Min/@Split[Select[Range[100],pripow],#1+1==#2&]//Most
Showing 1-10 of 45 results. Next