login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A161203 n-th square plus n-th squarefree number. 2
2, 6, 12, 21, 31, 43, 59, 75, 94, 114, 136, 161, 188, 217, 247, 279, 315, 353, 391, 431, 474, 518, 564, 613, 663, 715, 770, 826, 884, 946, 1008, 1075, 1142, 1211, 1282, 1354, 1428, 1505, 1583 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
FORMULA
a(n) = n^2 + A005117(n) = A000290(n) + A005117(n).
EXAMPLE
a(1) = 1^2 + 1.
a(2) = 2^2 + 2.
a(3) = 3^2 + 3.
a(4) = 4^2 + 5.
MATHEMATICA
Module[{nn=40, sqs, sfree}, sqs=Range[nn]^2; sfree=Take[Select[Range[3nn], SquareFreeQ], nn]; Total/@Thread[{sqs, sfree}]] (* Harvey P. Dale, May 06 2012 *)
PROG
(Python)
from math import isqrt
from sympy import mobius
def A161203(n):
def f(x): return n+x-sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))
m, k = n, f(n)
while m != k:
m, k = k, f(k)
return m+n**2 # Chai Wah Wu, Aug 12 2024
CROSSREFS
Sequence in context: A354895 A214916 A323291 * A292768 A352990 A184637
KEYWORD
nonn,easy,changed
AUTHOR
Jonathan Vos Post, Jan 20 2011
EXTENSIONS
Corrected (75 inserted) by Harvey P. Dale, May 06 2012
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 21 21:44 EDT 2024. Contains 375353 sequences. (Running on oeis4.)