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!)
A363421 a(n) = Sum_{k=0..n}(n^[not(k | n)] - n^[k | n]), where '[ ]' denotes the Iverson bracket. 5
1, 0, -1, 0, -3, 8, -5, 24, 7, 32, 27, 80, 11, 120, 91, 112, 105, 224, 119, 288, 171, 280, 315, 440, 207, 480, 475, 520, 459, 728, 435, 840, 651, 832, 891, 952, 665, 1224, 1147, 1216, 975, 1520, 1107, 1680, 1419, 1496, 1755, 2024, 1363, 2112, 1911, 2200, 2091 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
LINKS
FORMULA
a(n) = n^2 - 2*(n - 1)*tau(n) - 1 for n >= 1, where tau = A000005.
MATHEMATICA
A363421[n_]:=If[n==0, 1, n^2-2(n-1)DivisorSigma[0, n]-1]; Array[A363421, 100, 0] (* Paolo Xausa, Aug 06 2023 *)
PROG
(SageMath)
print([sum(n^(not k.divides(n)) - n^k.divides(n) for k in srange(n+1)) for n in srange(53)])
(Python)
from sympy import divisor_count
def A363421(n): return n**2-2*(n-1)*divisor_count(n)-1 if n else 1 # Chai Wah Wu, Jun 28 2023
CROSSREFS
Sequence in context: A143753 A121164 A086872 * A323760 A054792 A144872
KEYWORD
sign
AUTHOR
Peter Luschny, Jun 27 2023
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 15 12:24 EDT 2024. Contains 375173 sequences. (Running on oeis4.)