[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Search: a034953 -id:a034953
     Sort: relevance | references | number | modified | created      Format: long | short | data
Numbers k such that 2k-1 is prime.
+0
85
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,1
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
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
MATHEMATICA
Rest@Prime@Range@70/2 + 1/2 (* Robert G. Wilson v, Jun 16 2006 *)
Select[Range[200], PrimeQ[2#-1]&] (* Harvey P. Dale, Apr 06 2014 *)
PROG
(Magma) [n: n in [0..1000] | IsPrime(2*n-1)]; // Vincenzo Librandi, Nov 18 2010
(PARI) a(n)=prime(n+1)\2+1 \\ Charles R Greathouse IV, Mar 20 2013
(Python)
from sympy import prime
def A006254(n): return prime(n+1)+1>>1 # Chai Wah Wu, Aug 02 2024
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).
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from Erich Friedman
More terms from Omar E. Pol, Nov 10 2007
STATUS
approved
Numbers k such that 2*k + 3 is a prime.
+0
65
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,3
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
LINKS
Mutsumi Suzuki, Vincenzo Librandi's method for sequential primes (Librandi's description in Italian).
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
MAPLE
select(t -> isprime(2*t+3), [$0..1000]); # Robert Israel, Feb 19 2015
MATHEMATICA
(Prime[Range[100]+1]-3)/2 (* Vladimir Joseph Stephan Orlovsky, Sep 08 2008, modified by G. C. Greubel, May 21 2019 *)
Select[Range[0, 200], PrimeQ[2#+3]&] (* Harvey P. Dale, Jun 10 2014 *)
PROG
(PARI) [k | k<-[0..99], isprime(2*k+3)] \\ for illustration
(PARI) A067076(n) = (prime(n+1)-3)/2 \\ M. F. Hasler, Feb 14 2024
(Magma)[n: n in [0..200]| IsPrime(2*n+3)]; // Vincenzo Librandi, Feb 23 2012
(Sage) [n for n in (0..200) if is_prime(2*n+3) ] # G. C. Greubel, May 21 2019
(GAP) Filtered([0..200], k-> IsPrime(2*k+3) ) # G. C. Greubel, May 21 2019
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).
KEYWORD
nonn,easy
AUTHOR
David Williams, Aug 17 2002
EXTENSIONS
Offset changed from 0 to 1 in 2008: some formulas here and elsewhere may need to be corrected.
STATUS
approved
a(n) = p*(p-1)/2 for p = prime(n).
+0
30
1, 3, 10, 21, 55, 78, 136, 171, 253, 406, 465, 666, 820, 903, 1081, 1378, 1711, 1830, 2211, 2485, 2628, 3081, 3403, 3916, 4656, 5050, 5253, 5671, 5886, 6328, 8001, 8515, 9316, 9591, 11026, 11325, 12246, 13203, 13861, 14878, 15931, 16290, 18145, 18528, 19306
OFFSET
1,2
COMMENTS
Whereas A034953 is the sequence of triangular numbers with prime indices, this is the sequence of triangular numbers with numbers one less than primes for indices. - Alonso del Arte, Aug 17 2014
From Jianing Song, Apr 13 2019: (Start)
a(n) is both the number of quadratic residues and the number of nonresidues modulo prime(n)^2 that are coprime to prime(n).
For k coprime to prime(n), k^a(n) == +-1 (mod prime(n)^2). (End)
LINKS
FORMULA
a(n) = binomial(prime(n), 2) = A000217(A000040(n)). - Enrique Pérez Herrero, Dec 10 2011
a(n) = (1/2)*A072230(A000040(n)). - L. Edson Jeffery, Apr 07 2012
a(n) = (phi(prime(n))^2 + phi(prime(n)))/2, where phi(n) is Euler's totient function, A000010. - Alonso del Arte, Aug 22 2014
a(n) = A036689(n)/2. - Antti Karttunen, May 01 2015
Product_{n>=2} (1 - 1/a(n)) = A271780. - Amiram Eldar, Nov 22 2022
MAPLE
a:= n-> (p-> p*(p-1)/2)(ithprime(n)):
seq(a(n), n=1..65); # Alois P. Heinz, Apr 20 2022
MATHEMATICA
Table[Prime[n] * (Prime[n] - 1)/2, {n, 22}] (* Vladimir Joseph Stephan Orlovsky, Apr 29 2008 *)
Table[Binomial[Prime[n], 2], {n, 40}] (* Alonso del Arte, Aug 22 2014, based on the formula from Enrique Pérez Herrero *)
(#(#-1))/2&/@Prime[Range[50]] (* Harvey P. Dale, Oct 02 2019 *)
PROG
(Magma) [ (k-1)*k/2 where k is NthPrime(n): n in [1..44] ]; // Klaus Brockhaus, Nov 18 2008
(PARI) { n=0; forprime (p=2, prime(1000), write("b008837.txt", n++, " ", p*(p - 1)/2) ) } \\ Harry J. Smith, Jul 25 2009
(Scheme) (define (A008837 n) (/ (A036689 n) 2)) ;; Antti Karttunen, May 01 2015
CROSSREFS
Half the terms of A036689.
Cf. A000217 (triangular numbers), A112456 (least triangular number divisible by n-th prime). - Klaus Brockhaus, Nov 18 2008
Column 1 of A257253. (Row 1 of A257254).
KEYWORD
nonn,easy
EXTENSIONS
Offset changed from 2 to 1 by Harry J. Smith, Jul 25 2009
STATUS
approved
Length of period of continued fraction for sqrt(prime(n)).
+0
18
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,2
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
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 *)
CROSSREFS
Cf. A003285, A130272 (primes at which the period length sets a new record).
KEYWORD
nonn,easy,nice
AUTHOR
N. J. A. Sloane, May 05 2000
EXTENSIONS
More terms from James A. Sellers, May 05 2000
STATUS
approved
Product of three numbers: n-th prime, previous number, and following number.
+0
15
6, 24, 120, 336, 1320, 2184, 4896, 6840, 12144, 24360, 29760, 50616, 68880, 79464, 103776, 148824, 205320, 226920, 300696, 357840, 388944, 492960, 571704, 704880, 912576, 1030200, 1092624, 1224936, 1294920, 1442784, 2048256, 2247960, 2571216, 2685480, 3307800
OFFSET
1,1
COMMENTS
a(n) is the order of the matrix group SL(2,prime(n)). - Tom Edgar, Sep 28 2015
LINKS
J. B. Marshall, On the extension of Fermat's theorem to matrices of order n, Proceedings of the Edinburgh Mathematical Society 6 (1939) 85-91. See (11) page 90-91 when p=2.
FORMULA
a(n) = prime(n)*(prime(n)^2-1). - Tom Edgar, Sep 28 2015
a(n) = 2 * A117762(n), for n > 1. - Altug Alkan, Sep 28 2015
From Amiram Eldar, Nov 22 2022: (Start)
Product_{n>=1} (1 + 1/a(n)) = A065487.
Product_{n>=1} (1 - 1/a(n)) = A065470. (End)
MATHEMATICA
Table[(Prime[n] + 1) Prime[n](Prime[n] - 1), {n, 1, 100}]
PROG
(PARI) forprime(p=2, 1e3, print1(6*binomial(p+1, 3)", ")) \\ Charles R Greathouse IV, Jun 16 2011
(PARI) a(n) = prime(n)*(prime(n)^2-1);
vector(40, n, a(n)) \\ Altug Alkan, Sep 28 2015
(Magma) [6] cat [NthPrime(n)*(NthPrime(n)^2-1): n in [2..40]]; // Vincenzo Librandi, Sep 29 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Artur Jasinski, Feb 06 2007
STATUS
approved
Product of a prime and the following number.
+0
14
6, 12, 30, 56, 132, 182, 306, 380, 552, 870, 992, 1406, 1722, 1892, 2256, 2862, 3540, 3782, 4556, 5112, 5402, 6320, 6972, 8010, 9506, 10302, 10712, 11556, 11990, 12882, 16256, 17292, 18906, 19460, 22350, 22952, 24806, 26732, 28056, 30102
OFFSET
1,1
COMMENTS
The infinite sum over the reciprocals is given in A179119. - Wolfdieter Lang, Jul 10 2019
1/a(n) is the asymptotic density of numbers whose prime(n)-adic valuation is positive and even. - Amiram Eldar, Jan 23 2021
LINKS
FORMULA
a(n) = prime(n)*(prime(n)+1).
a(n) = A060800(n) - 1.
a(n) = 2*A034953(n). - Artur Jasinski, Feb 06 2007
From Amiram Eldar, Jan 23 2021: (Start)
Product_{n>=1} (1 + 1/a(n)) = zeta(2)/zeta(3) (A306633).
Product_{n>=1} (1 - 1/a(n)) = A065463. (End)
EXAMPLE
a(3)=30 because prime(3)=5 and prime(3)+1=6, hence 5*6 = 30.
MATHEMATICA
Table[(Prime[n] + 1) Prime[n], {n, 1, 100}] (* Artur Jasinski, Feb 06 2007 *)
PROG
(Magma)[p^2+p: p in PrimesUpTo(250)]; // Vincenzo Librandi, Dec 19 2010
(PARI) a(n)=my(p=prime(n)); p*(p+1) \\ Charles R Greathouse IV, Mar 27 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved
a(n) = prime(n*(n+1)/2).
+0
10
2, 5, 13, 29, 47, 73, 107, 151, 197, 257, 317, 397, 467, 571, 659, 769, 883, 1019, 1151, 1291, 1453, 1607, 1783, 1987, 2153, 2371, 2593, 2791, 3037, 3307, 3541, 3797, 4073, 4357, 4657, 4973, 5303, 5641, 5939, 6301, 6679, 7019, 7477
OFFSET
1,1
COMMENTS
There are n distinct successive primes p (not appearing in the sequence) such that a(n) < p < a(n+1). - David James Sycamore, Jul 22 2018
LINKS
Eric Weisstein's World of Mathematics, Triangular Number.
FORMULA
a(n) is asymptotic to (n*(n+1)/2) * log(n*(n+1)/2) = (n*(n+1)/2) * (log(n)+log(n+1)-log(2)) ~ (n^2 + n)*(2 log n)/2 ~ (n^2 + n)*(log n). - Jonathan Vos Post, Mar 12 2006
a(n) = A000040(A000217(n)). - David James Sycamore, Sep 03 2024
MAPLE
seq(ithprime(n*(n+1)/2), n=1..50); # Muniru A Asiru, Jul 22 2018
MATHEMATICA
Prime[#]&/@Accumulate[Range[50]] (* Harvey P. Dale, Mar 23 2015 *)
PROG
(Magma) [NthPrime(n*(n+1) div 2): n in [1..100] ]; // Vincenzo Librandi, Apr 11 2011
(Haskell)
a011756 n = a011756_list !! (n-1)
a011756_list = map a000040 $ tail a000217_list
-- Reinhard Zumkeller, Sep 23 2011
(PARI) a(n) = prime(n*(n+1)/2); \\ Michel Marcus, Jul 22 2018
CROSSREFS
Primes in leading diagonal of triangle in A078721.
Cf. A195678.
Cf. A000720.
KEYWORD
nonn
AUTHOR
STATUS
approved
Half of product of three numbers: n-th prime, previous and following number.
+0
9
3, 12, 60, 168, 660, 1092, 2448, 3420, 6072, 12180, 14880, 25308, 34440, 39732, 51888, 74412, 102660, 113460, 150348, 178920, 194472, 246480, 285852, 352440, 456288, 515100, 546312, 612468, 647460, 721392, 1024128, 1123980, 1285608
OFFSET
1,1
COMMENTS
Apart from the first term, the same as A117762. - R. J. Mathar, Jun 14 2008
Except the first term, a(n) is the area of the integer-sided isosceles triangle ABC with AB=AC such that the altitude AH is of prime(n) length.
The couples (a(n), altitude) are (12,3), (60,5), (168,7), (660,11), (1092,13), ... and the sequence of the ratio a(n)/prime(n) is {4, 12, 24, 60, 84, 144, 180, ...} - see A084921. - Michel Lagneau, Oct 23 2013
a(n) is also equal to the number of reducible quadratic polynomials in the field of size prime(n). - James East, Apr 26 2024
LINKS
MATHEMATICA
Table[(Prime[n] + 1) Prime[n](Prime[n] - 1)/2, {n, 1, 100}]
PROG
(PARI) forprime(p=2, 1e3, print1(3*binomial(p+1, 3)", ")) \\ Charles R Greathouse IV, Jun 16 2011
(Magma) [(NthPrime(n)+1)*NthPrime(n)*(NthPrime(n)-1)/2: n in [1..40]]; // Vincenzo Librandi, Apr 09 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Artur Jasinski, Feb 06 2007
STATUS
approved
1/3 of product of three numbers: the n-th prime, the previous number and the following number.
+0
9
2, 8, 40, 112, 440, 728, 1632, 2280, 4048, 8120, 9920, 16872, 22960, 26488, 34592, 49608, 68440, 75640, 100232, 119280, 129648, 164320, 190568, 234960, 304192, 343400, 364208, 408312, 431640, 480928, 682752, 749320, 857072, 895160, 1102600
OFFSET
1,1
COMMENTS
Number of irreducible monic cubic polynomials over GF(prime(n)). - Robert Israel, Jan 06 2015
LINKS
FORMULA
a(n) = (prime(n)^3 - prime(n))/3. - Wesley Ivan Hurt, Oct 15 2023
MAPLE
seq((ithprime(n)^3 - ithprime(n))/3, n=1..100); # Robert Israel, Jan 06 2015
MATHEMATICA
Table[(Prime[n] + 1) Prime[n] (Prime[n] - 1)/3, {n, 100}]
PROG
(PARI) forprime(p=2, 1e3, print1(2*binomial(p+1, 3)", ")) \\ Charles R Greathouse IV, Jun 16 2011
(Magma) [(p^3 - p) div 3: p in PrimesUpTo(150)]; // Vincenzo Librandi, Jan 08 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Artur Jasinski, Feb 06 2007
STATUS
approved
Difference between the sum of next prime(n) natural numbers and the sum of next n primes.
+0
8
1, 4, 9, 10, 54, 71, 191, 236, 446, 1025, 1310, 2259, 3245, 3820, 5048, 7321, 10060, 11473, 15328, 18358, 20381, 25672, 30222, 36561, 46367, 53031, 58108, 65444, 70971, 78391, 104184, 116542, 133095, 142728, 169931, 181324, 203429, 226622
OFFSET
1,2
COMMENTS
Group the natural numbers with prime(n) elements in each group. (1,2),(3,4,5),(6,7,8,9,10),(11,12,13,14,15,16,17),... The sum corresponding the groups is 3,12,40,98,... Group the prime numbers such that the n-th group contains n primes. (2),(3,5),(7,11,13),(17,19,23,29),... The sum corresponding the groups is 2,8,31,88,... The required difference is 1,4,9,10,...
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
FORMULA
a(n) = ((A061802(n-1) + 1)*A000040(n))/2 - A007468(n). - Gionata Neri, May 17 2015
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Apr 17 2003
EXTENSIONS
More terms from Ray Chandler, May 13 2003
STATUS
approved

Search completed in 0.020 seconds