The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A233468 The digital root of prime(n+1) minus the digital root of prime(n). 1
 1, 2, 2, -5, 2, 4, -7, 4, -3, 2, -3, 4, 2, -5, 6, -3, 2, -3, 4, -7, 6, -5, 6, -1, -5, 2, 4, -7, 4, -4, 4, -3, 2, 1, 2, -3, -3, 4, -3, 6, -7, 1, 2, 4, -7, 3, 3, -5, 2, 4, -3, 2, 1, -3, -3, 6, -7, 6, -5, 2, 1, -4, 4, 2, -5, 5, -3, 1, 2, -5, 6 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 LINKS Conner L. Delahanty, Table of n, a(n) for n = 1..20000 FORMULA a(n) = (prime(n+1) mod 9) - (prime(n) mod 9). a(n) = prime(n + 1) - 9*floor((prime(n + 1) - 1)/9) - prime(n) + 9*floor((prime(n) - 1)/9). - Wesley Ivan Hurt, Apr 19 2014 a(n) = A010888(A000040(n+1) - A010888(A000040(n). - Michel Marcus, Apr 19 2014 EXAMPLE For n = 1, (prime(2) mod 9) - (prime(1) mod 9) =  3 (mod 9) - 2 (mod 9) = 3-2 = 1. For n = 2, (prime(3) mod 9) - (prime(2) mod 9) =  5 (mod 9) - 3 (mod 9) = 5-3 = 2. For n = 3, (prime(4) mod 9) - (prime(3) mod 9) =  7 (mod 9) - 5 (mod 9) = 7-5 = 2. For n = 4, (prime(5) mod 9) - (prime(4) mod 9) = 11 (mod 9) - 7 (mod 9) = 2-7 = -5. MAPLE A233468:=n->(ithprime(n+1) mod 9) - (ithprime(n) mod 9); seq(A233468(n), n=1..100); # Wesley Ivan Hurt, Apr 19 2014 MATHEMATICA Table[Mod[Prime[n + 1], 9] - Mod[Prime[n], 9], {n, 100}] (* Wesley Ivan Hurt, Apr 19 2014 *) PROG (Python) dd=[] def prim(end): ....num=3 ....primes=[2, 3] ....while (len(primes)<=end): ........num+=1 ........prime=False ........length=len(primes) ........for y in range(0, length): ............if (num % primes[y]!=0): ................prime=True ............else: ................prime=False ................break ........if (prime): ............primes.append(num) ....for x in range(len(primes)-1): ........dd.append((primes[x+1]%9) - (primes[x]%9)) ....return dd CROSSREFS Cf. A000040, A010888. Sequence in context: A004543 A153078 A245565 * A076200 A039931 A128645 Adjacent sequences:  A233465 A233466 A233467 * A233469 A233470 A233471 KEYWORD base,sign,easy AUTHOR Conner L. Delahanty, Apr 18 2014 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.

Last modified May 22 22:13 EDT 2022. Contains 353959 sequences. (Running on oeis4.)