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”).

A281680
a(0)=1; for n > 0, if 2n+1 is prime, then a(n)=1, otherwise a(n) = (2n+1)/(largest proper divisor of 2n+1).
2
1, 1, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 5, 3, 1, 1, 3, 5, 1, 3, 1, 1, 3, 1, 7, 3, 1, 5, 3, 1, 1, 3, 5, 1, 3, 1, 1, 3, 7, 1, 3, 1, 5, 3, 1, 7, 3, 5, 1, 3, 1, 1, 3, 1, 1, 3, 1, 5, 3, 7, 11, 3, 5, 1, 3, 1, 7, 3, 1, 1, 3, 11, 5, 3, 1, 1, 3, 5, 1, 3, 7, 1, 3, 1, 13, 3, 1
OFFSET
0,5
COMMENTS
First occurrence of the k-th prime for k = 2, 3, 4, ... is at n = 4, 12, 24, 60, 84, 144, 180, 264, 420, 480, 684, 840, 924, 1104, etc.; This appears to be either A084921 or A216244. - Robert G. Wilson v, Feb 03 2017
LINKS
MAPLE
f:= proc(n) if isprime(2*n+1) then 1 else min(numtheory:-factorset(2*n+1)) fi end proc:
f(0):= 1:
map(f, [$0..100]); # Robert Israel, Aug 03 2020
MATHEMATICA
f[n_] := If[ PrimeQ[2n +1], 1, FactorInteger[2n +1][[1, 1]]]; f[0] = 1; Array[f, 87, 0] (* Robert G. Wilson v, Jan 31 2017 *)
PROG
(PARI) a(n) = if (n==0, 1, if (isprime(o=2*n+1), 1, d=divisors(o); o/d[#d-1])); \\ Michel Marcus, Feb 02 2017
CROSSREFS
Sequence in context: A101685 A238737 A049653 * A377864 A060266 A073310
KEYWORD
nonn
AUTHOR
Enrique Navarrete, Jan 26 2017
STATUS
approved