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-7 of 7 results.

A006254 Numbers k such that 2k-1 is prime.

Original entry on oeis.org

2, 3, 4, 6, 7, 9, 10, 12, 15, 16, 19, 21, 22, 24, 27, 30, 31, 34, 36, 37, 40, 42, 45, 49, 51, 52, 54, 55, 57, 64, 66, 69, 70, 75, 76, 79, 82, 84, 87, 90, 91, 96, 97, 99, 100, 106, 112, 114, 115, 117, 120, 121, 126, 129, 132, 135, 136, 139, 141, 142, 147, 154, 156, 157
Offset: 1

Views

Author

Keywords

Comments

a(n) is the inverse of 2 modulo prime(n) for n >= 2. - Jean-François Alcover, May 02 2017
The following sequences (allowing offset of first term) all appear to have the same parity: A034953, triangular numbers with prime indices; A054269, length of period of continued fraction for sqrt(p), p prime; A082749, difference between the sum of next prime(n) natural numbers and the sum of next n primes; A006254, numbers n such that 2n-1 is prime; A067076, 2n+3 is a prime. - Jeremy Gardiner, Sep 10 2004
Positions of prime numbers among odd numbers. - Zak Seidov, Mar 26 2013
Also, the integers remaining after removing every third integer following 2, and, recursively, removing every p-th integer following the next remaining entry (where p runs through the primes, beginning with 5). - Pete Klimek, Feb 10 2014
Also, numbers k such that k^2 = m^2 + p, for some integers m and every prime p > 2. Applicable m values are m = k - 1 (giving p = 2k - 1). Less obvious is: no solution exists if m equals any value in A047845, which is the complement of (A006254 - 1). - Richard R. Forberg, Apr 26 2014
If you define a different type of multiplication (*) where x (*) y = x * y + (x - 1) * (y - 1), (which has the commutative property) then this is the set of primes that follows. - Jason Atwood, Jun 16 2019

Crossrefs

Equals A005097 + 1. A130291 is an essentially identical sequence.
Cf. A065091.
Numbers n such that 2n+k is prime: A005097 (k=1), A067076 (k=3), A089038 (k=5), A105760 (k=7), A155722 (k=9), A101448 (k=11), A153081 (k=13), A089559 (k=15), A173059 (k=17), A153143 (k=19).
Numbers n such that 2n-k is prime: this seq(k=1), A098090 (k=3), A089253 (k=5), A089192 (k=7), A097069 (k=9), A097338 (k=11), A097363 (k=13), A097480 (k=15), A098605 (k=17), A097932 (k=19).

Programs

Formula

a(n) = (A000040(n+1) + 1)/2 = A067076(n-1) + 2 = A086801(n-1)/2 + 2.
a(n) = (1 + A065091(n))/2. - Omar E. Pol, Nov 10 2007
a(n) = sqrt((A065091^2 + 2*A065091+1)/4). - Eric Desbiaux, Jun 29 2009
a(n) = A111333(n+1). - Jonathan Sondow, Jan 20 2016

Extensions

More terms from Erich Friedman
More terms from Omar E. Pol, Nov 10 2007

A067076 Numbers k such that 2*k + 3 is a prime.

Original entry on oeis.org

0, 1, 2, 4, 5, 7, 8, 10, 13, 14, 17, 19, 20, 22, 25, 28, 29, 32, 34, 35, 38, 40, 43, 47, 49, 50, 52, 53, 55, 62, 64, 67, 68, 73, 74, 77, 80, 82, 85, 88, 89, 94, 95, 97, 98, 104, 110, 112, 113, 115, 118, 119, 124, 127, 130, 133, 134, 137, 139, 140, 145, 152, 154, 155
Offset: 1

Views

Author

David Williams, Aug 17 2002

Keywords

Comments

The following sequences (allowing offset of first term) all appear to have the same parity: A034953, triangular numbers with prime indices; A054269, length of period of continued fraction for sqrt(p), p prime; A082749, difference between the sum of next prime(n) natural numbers and the sum of next n primes; A006254, numbers n such that 2n-1 is prime; A067076, 2n+3 is a prime. - Jeremy Gardiner, Sep 10 2004
n is in the sequence iff none of the numbers (n-3k)/(2k+1), 1 <= k <= (n-1)/5, is positive integer. - Vladimir Shevelev, May 31 2009
Zeta(s) = Sum_{n>=1} 1/n^s = 1/1 - 2^(-s) * Product_{p=prime=(2*A067076)+3} 1/(1 - (2*A067076+3)^(-s)). - Eric Desbiaux, Dec 15 2009
This sequence is a subsequence of A047949. - Jason Kimberley, Aug 30 2012

Crossrefs

Numbers n such that 2n+k is prime: A005097 (k=1), this seq(k=3), A089038 (k=5), A105760 (k=7), A155722 (k=9), A101448 (k=11), A153081 (k=13), A089559 (k=15), A173059 (k=17), A153143 (k=19). - Jason Kimberley, Sep 07 2012
Numbers n such that 2n-k is prime: A006254 (k=1), A098090 (k=3), A089253 (k=5), A089192 (k=7), A097069 (k=9), A097338 (k=11), A097363 (k=13), A097480 (k=15), A098605 (k=17), A097932 (k=19).

Programs

Formula

a(n) = A006254(n) - 2 = A086801(n+1)/2. [Corrected by M. F. Hasler, Feb 14 2024]
a(n) = A089253(n) - 4. - Giovanni Teofilatto, Dec 14 2003
Conjecture: a(n) = A008507(n) + n - 1 = A005097(n) - 1 = A102781(n+1) - 1. - R. J. Mathar, Jul 07 2009
a(n) = A179893(n) - A000040(n). - Odimar Fabeny, Aug 24 2010

Extensions

Offset changed from 0 to 1 in 2008: some formulas here and elsewhere may need to be corrected.

A034953 Triangular numbers (A000217) with prime indices.

Original entry on oeis.org

3, 6, 15, 28, 66, 91, 153, 190, 276, 435, 496, 703, 861, 946, 1128, 1431, 1770, 1891, 2278, 2556, 2701, 3160, 3486, 4005, 4753, 5151, 5356, 5778, 5995, 6441, 8128, 8646, 9453, 9730, 11175, 11476, 12403, 13366, 14028, 15051, 16110, 16471, 18336, 18721, 19503
Offset: 1

Views

Author

Patrick De Geest, Oct 15 1998

Keywords

Comments

The following sequences (allowing offset of first term) all appear to have the same parity: A034953, triangular numbers with prime indices; A054269, length of period of continued fraction for sqrt(p), p prime; A082749, difference between the sum of next prime(n) natural numbers and the sum of next n primes; A006254, numbers n such that 2n-1 is prime; A067076, 2n+3 is a prime. - Jeremy Gardiner, Sep 10 2004
Given a rectangular prism with sides 1, p, p^2 for p = n-th prime (n > 1), the area of the six sides divided by the volume gives a remainder which is 4*a(n). - J. M. Bergot, Sep 12 2011
The infinite sum over the reciprocals is given by 2*A179119. - Wolfdieter Lang, Jul 10 2019

Crossrefs

Programs

  • Haskell
    a034953 n = a034953_list !! (n-1)
    a034953_list = map a000217 a000040_list
    -- Reinhard Zumkeller, Sep 23 2011
  • Maple
    a:= n-> (p-> p*(p+1)/2)(ithprime(n)):
    seq(a(n), n=1..65);  # Alois P. Heinz, Apr 20 2022
  • Mathematica
    t[n_] := n(n + 1)/2; Table[t[Prime[n]], {n, 44}] (* Robert G. Wilson v, Aug 12 2004 *)
    (#(# + 1))/2&/@Prime[Range[50]] (* Harvey P. Dale, Feb 27 2012 *)
    With[{nn=200},Pick[Accumulate[Range[nn]],Table[If[PrimeQ[n],1,0],{n,nn}],1]] (* Harvey P. Dale, Mar 05 2023 *)
  • PARI
    forprime(p=2,1e3,print1(binomial(p+1,2)", ")) \\ Charles R Greathouse IV, Jul 19 2011
    
  • PARI
    apply(n->binomial(n+1,2),primes(100)) \\ Charles R Greathouse IV, Jun 04 2013
    

Formula

a(n) = A000217(A000040(n)). - Omar E. Pol, Jul 27 2009
a(n) = Sum_{k=1..prime(n)} k. - Wesley Ivan Hurt, Apr 27 2021
Product_{n>=1} (1 - 1/a(n)) = A307868. - Amiram Eldar, Nov 07 2022

A054269 Length of period of continued fraction for sqrt(prime(n)).

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, May 05 2000

Keywords

Comments

The following sequences (allowing offset of first term) all appear to have the same parity: A034953, triangular numbers with prime indices; A054269, length of period of continued fraction for sqrt(p), p prime; A082749, difference between the sum of next prime(n) natural numbers and the sum of next n primes; A006254, numbers n such that 2n-1 is prime; A067076, 2n+3 is a prime. - Jeremy Gardiner, Sep 10 2004
Note that primes of the form n^2+1 (A002496) have a continued fraction whose period length is 1; odd primes of the form n^2+2 (A056899) have length 2; odd primes of the form n^2-2 (A028871) have length 4. - T. D. Noe, Nov 03 2006
For an odd prime p, the length of the period is odd if p=1 (mod 4) or even if p=3 (mod 4). - T. D. Noe, May 22 2007

Crossrefs

Cf. A003285, A130272 (primes at which the period length sets a new record).

Programs

  • Maple
    with(numtheory): for i from 1 to 150 do cfr := cfrac(ithprime(i)^(1/2), 'periodic','quotients'); printf(`%d,`, nops(cfr[2])) od:
  • Mathematica
    Table[p=Prime[n]; Length[Last[ContinuedFraction[Sqrt[p]]]],{n,100}] (* T. D. Noe, May 22 2007 *)
    Length[ContinuedFraction[Sqrt[#]][[2]]]&/@Prime[Range[100]] (* Harvey P. Dale, Sep 28 2024 *)

Extensions

More terms from James Sellers, May 05 2000

A098033 Parity of p*(p+1)/2 for n-th prime p.

Original entry on oeis.org

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

Views

Author

Jeremy Gardiner, Sep 10 2004

Keywords

Comments

The following sequences (possibly with a different offset for first term) all appear to have the same parity: A034953 = triangular numbers with prime indices; A054269 = length of period of continued fraction for sqrt(p), p prime; A082749 = difference between the sum of the next prime(n) natural numbers and the sum of the next n primes; A006254 = numbers n such that 2n-1 is prime; A067076 = numbers n such that 2n+3 is a prime.
Analogous to the prime race (mod 3). - Robert G. Wilson v, Sep 17 2004
See also A089253 = 2n-5 is a prime.
For n > 1, if A000040(n) == 1 (mod 4), then a(n) = 1, otherwise a(n)=0, so (for n>1) also a(n) = number of representations of A000040(n) as a difference of hexagonal numbers (A000384) (cf. [Nyblom, p. 262]). - L. Edson Jeffery, Feb 16 2013

Examples

			a(1) = parity of (2*(2+1)/2 = 3) = 1 (odd).
		

Crossrefs

Programs

Formula

a(n) = parity of p*(p+1)/2 for n-th prime p.
a(n) = 1 - A100672(n), n > 1. - Steven G. Johnson (stevenj(AT)math.mit.edu), Sep 18 2008
For n > 1, a(n) = (prime(n) mod 4) mod 3. - Gary Detlefs, Oct 27 2011

Extensions

More terms from Robert G. Wilson v, Sep 17 2004

A160973 a(n) is the number of positive integers of the form (n-3k)/(2k+1), 1 <= k <= (n-1)/5.

Original entry on oeis.org

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

Views

Author

Vladimir Shevelev, Jun 01 2009, Jun 07 2009

Keywords

Comments

If n is different from 3, then a(n)=0 iff n is in A067076, i.e., 2n+3 is prime.

Crossrefs

Programs

  • Mathematica
    a[n_] := Length[Select[Range[Floor[(n-1)/5]], IntegerQ[(n-3#)/(2#+1)] &]]; Array[a, 100, 0] (* Amiram Eldar, Dec 15 2018 *)
  • PARI
    a(n) = sum(k=1, (n-1)/5, frac((n-3*k)/(2*k+1)) == 0); \\ Michel Marcus, Dec 15 2018

Extensions

Edited by N. J. A. Sloane, Jun 07 2009
a(44) corrected and more terms from Michel Marcus, Dec 15 2018

A161116 a(n) is the number of nontrivial positive divisors of 2n+3.

Original entry on oeis.org

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

Views

Author

Vladimir Shevelev, Jun 02 2009

Keywords

Comments

a(n)=0 iff n is in A067076, i.e., 2n+3 is prime; a(n) is the number of positive integers of the form (n-3k)/(2k+1), 1<=k<=n/3.

Examples

			Since for n=3 we have 2n+3=9 and only nontrivial divisor of 9 is 3, then a(3)=1.
		

Crossrefs

Programs

Formula

For n>=1, a(n)=A160973(n)+A079978(n). [Vladimir Shevelev, Jun 07 2009]
a(n) = A070824(2n+3).

Extensions

Edited by Charles R Greathouse IV, Oct 12 2009
More terms from Michel Marcus, Feb 08 2016
Showing 1-7 of 7 results.