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
LINKS
T. D. Noe, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = (1 + A065091(n))/2. - Omar E. Pol, Nov 10 2007
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
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).
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from Erich Friedman
More terms from Omar E. Pol, Nov 10 2007
STATUS
approved