OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Paulo A. Martin, The Galois group of x^n-x^(n-1)-...-x-1, Journal of Pure and Applied Algebra, Volume 190, Issues 1-3, 1 June 2004, Pages 213-223.
FORMULA
From Robert Israel, Jan 01 2019: (Start)
a(k-1+A000720(2*k)) = 2*k.
a((prime(k)-3)/2 + k) = prime(k) for k >= 2. (End)
MAPLE
map(op, [seq([2*k, `if`(isprime(2*k+1), 2*k+1, NULL)], k=1..100)]); # Robert Israel, Jan 01 2019
MATHEMATICA
Union[Prime[Range[30]], Select[Range[113], EvenQ]]
DeleteCases[Range[2, 100], _?(OddQ[#]&&CompositeQ[#]&)] (* Harvey P. Dale, Dec 04 2021 *)
PROG
(PARI) isok(n) = isprime(n) || ((n%2) == 0); \\ Michel Marcus, Feb 24 2020
(Python)
from sympy import primepi
def A106092(n):
m, k = n, 1+(n<<1)-primepi(n)-(n>>1)
while m != k:
m, k = k, 1+n+k-primepi(k)-(k>>1)
return m # Chai Wah Wu, Jul 31 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Zak Seidov, May 07 2005
STATUS
approved