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!)
A354975 a(n) = Sum_{i=1..n} (prime(i+n) mod prime(i)). 3

%I #20 Jun 20 2022 04:18:30

%S 1,2,6,9,16,26,25,46,47,54,81,112,140,116,173,215,254,234,317,329,409,

%T 440,511,584,581,582,666,649,776,866,875,967,1057,1152,1310,1419,1246,

%U 1294,1296,1551,1599,1722,1970,2152,2166,2154,2338,2396,2523,2831,3120,2867,3220,3332,3274,3266,3462

%N a(n) = Sum_{i=1..n} (prime(i+n) mod prime(i)).

%H Michael De Vlieger, <a href="/A354975/b354975.txt">Table of n, a(n) for n = 1..10000</a>

%e For n = 3, a(n) = (7 mod 2) + (11 mod 3) + (13 mod 5) = 1+2+3 = 6.

%p f:= proc(n) local k;

%p add(ithprime(n+k) mod ithprime(k),k=1..n)

%p end proc:

%p map(f, [$1..100]);

%t a[n_]:=Sum[Mod[Prime[i+n],Prime[i]],{i,n}]; Array[a,57] (* _Stefano Spezia_, Jun 15 2022 *)

%o (PARI) a(n) = sum(i=1, n, prime(i+n) % prime(i)); \\ _Michel Marcus_, Jun 15 2022

%o (Python)

%o from sympy import prime

%o def A354975(n): return sum(prime(i+n) % prime(i) for i in range(1,n+1)) # _Chai Wah Wu_, Jun 19 2022

%Y Cf. A000040, A207409, A354972, A355009.

%K nonn

%O 1,2

%A _J. M. Bergot_ and _Robert Israel_, Jun 15 2022

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 9 01:26 EDT 2024. Contains 375024 sequences. (Running on oeis4.)