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

A145737
a(n) = square part of A145609(n).
4
1, 5, 7, 1, 11, 13, 1, 17, 19, 1, 23, 1, 1, 29, 31, 1, 1, 37, 1, 41, 43, 1, 47, 1, 1, 53, 1, 1, 59, 61, 1, 1, 67, 1, 71, 73, 1, 1, 79, 1, 83, 1, 1, 89, 1, 1, 1, 97, 1, 101, 103, 1, 107, 109, 1, 113, 1, 1, 1, 1, 1, 1, 127, 1, 131, 1, 1, 137, 139, 1, 1, 1, 1, 149, 151, 1, 1, 157, 1, 1, 163
OFFSET
1,2
COMMENTS
For squarefree parts see A145738. A128059 is a very similar sequence.
FORMULA
a(n) = 2n+1 if 2n+1 is prime, 1 otherwise, for n > 1.
From Gary Detlefs, Oct 18 2011: (Start)
a(n) = Denominator(n!*(Sum_{k=1..n} k^3)/(Sum_{k=1..n} k^2))
= Denominator(n!*3*n*(n+1)/(2*(2*n+1))). (End)
MAPLE
seq(denom(n!*3*n*(n+1)/(2*(2*n+1))), n=1..81); # Gary Detlefs, Oct 18 2011
MATHEMATICA
m = 1; aa = {}; Do[k = 0; Do[k = k + m^(2 r + 1 - d)/d, {d, 1, 2 r}]; b = Sqrt[Numerator[k]] /. Sqrt[_] -> 1; AppendTo[aa, b], {r, 1, 137}]; aa (* Artur Jasinski *)
PROG
(Python)
from sympy import isprime
def A145737(n): return a if isprime(a:=(n<<1)+1) and n>1 else 1 # Chai Wah Wu, Feb 26 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Artur Jasinski, Oct 17 2008
STATUS
approved