login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A331503 a(n) is the number of sets modulo n which can be formed by a finite arithmetic sequence. 0
1, 3, 7, 15, 31, 42, 99, 119, 193, 218, 463, 340, 807, 682, 849, 1087, 1939, 1299, 2775, 1862, 2615, 3050, 5107, 2988, 5681, 5242, 6439, 5656, 10615, 5562, 13083, 9631, 11367, 12362, 14153, 10531, 22719, 17578, 19361, 16050, 31243, 16728, 36207, 24284, 26133 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Table of n, a(n) for n=1..45.

FORMULA

a(n) = sigma(n) + n*(tau(n) - 1 - 3*floor(n/2) + Sum_{i=1..floor(n/2)} n/gcd(n,i)).

EXAMPLE

For n = 3, the a(3) = 7 solutions are {1}; {2}; {3}; {1,2}; {1,3}; {2,3}; {1,2,3}.

MATHEMATICA

Array[#3 + #1 (#2 - 1 - 3 #4 + Sum[#1/GCD[#1, i], {i, #4}]) & @@ Join[{#}, DivisorSigma[{0, 1}, #], {Floor[#/2]}] &, 45] (* Michael De Vlieger, May 04 2020 *)

PROG

(PARI) a(n) = {sigma(n) + n*(numdiv(n) - 1 - 3*(n\2) + sum(i=1, n\2, n/gcd(n, i)))} \\ Andrew Howroyd, May 03 2020

CROSSREFS

Cf. A000005 (tau), A000203 (sigma).

Sequence in context: A275532 A212315 A043729 * A137170 A222813 A304078

Adjacent sequences:  A331500 A331501 A331502 * A331504 A331505 A331506

KEYWORD

nonn

AUTHOR

Brian Barsotti, May 03 2020

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 26 16:30 EST 2021. Contains 340442 sequences. (Running on oeis4.)