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!)
A357270 a(n) = s(n) mod prime(n+1), where s = A143293. 1

%I #37 Oct 16 2022 01:16:27

%S 1,0,4,4,7,11,0,3,15,6,11,9,4,41,4,26,28,56,4,54,23,37,78,48,11,17,32,

%T 68,85,34,78,12,120,28,68,24,76,116,17,55,40,3,91,111,132,133,195,75,

%U 179,44,211,108,3,63,21,28,85,22,208,237,9,166,81,183,205,208

%N a(n) = s(n) mod prime(n+1), where s = A143293.

%C Let i be some positive integer. Let r(n) = i mod prime(n+1). Let m be defined such that s(m-1) <= i < s(m). Then the first m values in the sequence {r(n)} uniquely define the integer (it is the least positive integer requiring those m remainders modulo those primes). If i is a term of {s(n)}, then a(n) = r(n) for n = 0..m-1.

%H Christopher A. Curry, <a href="/A357270/b357270.txt">Table of n, a(n) for n = 0..9999</a>

%t q[n_] := Insert[Table[Mod[Total[Table[Product[Prime[i], {i, 1, r}], {r, m}]] + 1, Prime[m + 1]], {m, n}], 1, 1]; q[65] (* _Samuel Harkness_, Sep 22 2022 *)

%o (PARI) a(n) = if(n==0, return(1)); my(P=1, s=1); forprime(p=2, prime(n), s+=P*=p); s % prime(n+1); \\ _Michel Marcus_, Sep 22 2022

%o (PARI) a(n,q=prime(n+1))=my(P=Mod(1,q),s=P); forprime(p=2,q-1, s+=P*=p); lift(s) \\ _Charles R Greathouse IV_, Sep 22 2022

%Y Cf. A000040, A143293.

%K nonn,easy

%O 0,3

%A _Christopher A. Curry_, Sep 21 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 10 19:25 EDT 2024. Contains 375058 sequences. (Running on oeis4.)