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!)
A331503 a(n) is the number of sets modulo n which can be formed by a finite arithmetic sequence. 0

%I #14 May 17 2020 15:39:25

%S 1,3,7,15,31,42,99,119,193,218,463,340,807,682,849,1087,1939,1299,

%T 2775,1862,2615,3050,5107,2988,5681,5242,6439,5656,10615,5562,13083,

%U 9631,11367,12362,14153,10531,22719,17578,19361,16050,31243,16728,36207,24284,26133

%N a(n) is the number of sets modulo n which can be formed by a finite arithmetic sequence.

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

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

%t 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 *)

%o (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

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

%K nonn

%O 1,2

%A _Brian Barsotti_, May 03 2020

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 April 24 03:08 EDT 2024. Contains 371918 sequences. (Running on oeis4.)