cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A076368 a(1) = 1; for n > 1, a(n) = prime(n) - prime(n-1) + 1.

This page as a plain text file.
%I A076368 #33 Sep 08 2022 08:45:07
%S A076368 1,2,3,3,5,3,5,3,5,7,3,7,5,3,5,7,7,3,7,5,3,7,5,7,9,5,3,5,3,5,15,5,7,3,
%T A076368 11,3,7,7,5,7,7,3,11,3,5,3,13,13,5,3,5,7,3,11,7,7,7,3,7,5,3,11,15,5,3,
%U A076368 5,15,7,11,3,5,7,9,7,7,5,7,9,5,9,11,3,11,3,7,5,7,9,5,3,5,13,9,5,9,5,7
%N A076368 a(1) = 1; for n > 1, a(n) = prime(n) - prime(n-1) + 1.
%C A076368 Number of occurrences of n in A060646 or n-th prime in A076367.
%C A076368 Sequences A060646, A076367, A076368 were used in proving a property of 30. See A048597, A060646 and corresponding References. It is provable [Bonse] that a(n)>=3 if n>3.
%C A076368 For n>1, a(n) is the sum of the digits of prime(n) in the base prime(n-1). - _R. J. Cano_, Dec 31 2016; corrected by _Michel Marcus_, Jan 01 2017
%H A076368 Vincenzo Librandi, <a href="/A076368/b076368.txt">Table of n, a(n) for n = 1..5000</a>
%H A076368 H. Bonse, <a href="https://archive.org/stream/archivdermathem31unkngoog#page/n307/mode/2up">Über eine bekannte Eigenshaft der Zahl 30 und ihre Verallgemeinerung</a>, Archiv d. Math. u. Physik (3) vol. 12 (1907) 292-295.
%t A076368 c[x_, j_] := x+1-(j+Prime[j])c[x, 0]=x; a=1000; t=Table[0, {a}]; t1=Table[0, {a}]; Table[fl=1; (*Print["% ", u, " #"]; *)Do[s=c[u, n]; If[Equal[fl, 1]&&Equal[Sign[s], -1], Print[n]; t[[u]]=n; t1[[u]]=Prime[n]; fl=0], {n, 1, u}], {u, 1, a}]//t (*=A060646*)//t1 (*=A076367*) Table[Count[t, j], {j, 1, PrimePi[a]}]
%t A076368 (* Second program *)
%t A076368 Table[If[n == 1, 1, (Prime@ n - Prime[n - 1]) + 1], {n, 97}] (* _Michael De Vlieger_, Dec 31 2016 *)
%t A076368 Join[{1},Differences[Prime[Range[100]]]+1] (* _Harvey P. Dale_, Mar 13 2019 *)
%o A076368 (Magma) [1] cat [NthPrime(n)-NthPrime(n-1)+1: n in [1..80]]; // _Vincenzo Librandi_, Jan 01 2017
%Y A076368 Cf. A048597, A060646, A076367. See also A076366.
%Y A076368 Cf. A000040, A001223.
%K A076368 nonn
%O A076368 1,2
%A A076368 _Labos Elemer_, Oct 14 2002
%E A076368 Simpler description from _Vladeta Jovovic_, Mar 29 2003