OFFSET
1,1
LINKS
Daniel Sturm, Table of n, a(n) for n = 1..1023
David A. Corneth, PARI program.
E. Proth, Théorèmes sur les nombres premiers, Comptes rendus hebdomadaires des séances de l'Académie des sciences, 1878, p. 926.
Wikipedia, Proth Primes.
FORMULA
a(2^b+c) = (2c+1)*2^(b+1) for 0 <= c < 2^b.
EXAMPLE
Displayed as an irregular triangle:
3;
5, 13;
9, 25, 41, 57;
17, 49, 81, 113, 145, 177, 209, 241;
...
PROG
(Python)
def A369901(n):
b = n.bit_length() - 1
c = n - 2**b
return (2*c+1)*2**(b+1)+1
(PARI) \\ See PARI link
CROSSREFS
KEYWORD
nonn,easy,tabf
AUTHOR
Daniel Sturm, Feb 05 2024
EXTENSIONS
More terms from David A. Corneth, Feb 05 2024
STATUS
approved