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.

A132199 Rowland's prime-generating sequence: first differences of A106108.

This page as a plain text file.
%I A132199 #74 Jun 15 2025 23:16:37
%S A132199 1,1,1,5,3,1,1,1,1,11,3,1,1,1,1,1,1,1,1,1,1,23,3,1,1,1,1,1,1,1,1,1,1,
%T A132199 1,1,1,1,1,1,1,1,1,1,1,1,47,3,1,5,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
%U A132199 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,101,3,1,1
%N A132199 Rowland's prime-generating sequence: first differences of A106108.
%C A132199 Rowland shows that the terms are all 1's or primes.
%C A132199 The prime terms form A137613.
%C A132199 See A137613 for additional comments, links and references. - _Jonathan Sondow_, Aug 14 2008
%C A132199 From _Robert G. Wilson v_, Apr 30 2009: (Start)
%C A132199 First appearance of k-th prime, k >= 0: 1, 0, 5, 4, 104, 10, 116, 242878, 242819, 22, 243019, 3891770, 242867, ..., .
%C A132199 The number of different numbers in the first 10^k terms beginning with k=0: 1, 4, 7, 12, 15, 19, 30, >35, ..., .
%C A132199 Record high values are A191304. (End)
%D A132199 Eric S. Rowland, A simple prime-generating recurrence, Abstracts Amer. Math. Soc., 29 (No. 1, 2008), p. 50 (Abstract 1035-11-986).
%H A132199 Robert G. Wilson v, <a href="/A132199/b132199.txt">Table of n, a(n) for n = 1..10000 </a>.
%H A132199 Jean-Paul Delahaye, <a href="https://www.pourlascience.fr/sr/logique-calcul/deconcertantes-conjectures-3819.php">Déconcertantes conjectures</a>, Pour la Science (French edition of Scientific American), No. 367, May 2008.
%H A132199 Brian Hayes, <a href="http://bit-player.org/2015/pumping-the-primes">Pumping the Primes</a>, bit-player, 19 August 2015.
%H A132199 Mario Raso, <a href="https://iris.uniroma1.it/handle/11573/1732819">Integer Sequences in Cryptography: A New Generalized Family and its Application</a>, Ph. D. Thesis, Sapienza University of Rome (Italy 2025). See p. 18.
%H A132199 Eric S. Rowland, <a href="http://arXiv.org/abs/0710.3217">A natural prime-generating recurrence</a>, arXiv:0710.3217 [math.NT], 2007-2008.
%H A132199 Eric S. Rowland, <a href="https://ericrowland.github.io/talks/A_simple_prime-generating_recurrence.pdf">A simple prime-generating recurrence</a>, 2008.
%H A132199 Eric S. Rowland, <a href="https://youtu.be/OpaKpzMFOpg">Prime-Generating Recurrences and a Tale of Logarithmic Scale</a>, 20 January 2023.
%p A132199 A106108 := proc(n)
%p A132199     option remember;
%p A132199     if n = 1 then
%p A132199         7;
%p A132199     else
%p A132199         procname(n-1)+igcd(n,procname(n-1)) ;
%p A132199     end if;
%p A132199 end proc:
%p A132199 A132199 := proc(n)
%p A132199     A106108(n+1)-A106108(n) ;
%p A132199 end proc: # _R. J. Mathar_, Jul 04 2013
%t A132199 a[1] = 7; a[n_] := a[n] = a[n - 1] + GCD[n, a[n - 1]]; t = Array[a, 104]; Rest@t - Most@t (* _Robert G. Wilson v_, Apr 30 2009 *)
%o A132199 (Haskell)
%o A132199 a132199 n = a132199_list !! (n-1)
%o A132199 a132199_list = zipWith (-) (tail a106108_list) a106108_list
%o A132199 -- _Reinhard Zumkeller_, Nov 15 2013
%o A132199 (PARI)
%o A132199 ub=1000; a=7; n=2; while(n<ub, d=gcd(n,a); print1(d,", "); a=a+d; n=n+1; ); \\ _Daniel Constantin Mayer_, Aug 31 2014
%o A132199 (Python)
%o A132199 from itertools import count, islice
%o A132199 from math import gcd
%o A132199 def A132199_gen(): # generator of terms
%o A132199     a = 7
%o A132199     for n in count(2):
%o A132199         yield (b:=gcd(a,n))
%o A132199         a += b
%o A132199 A132199_list = list(islice(A132199_gen(),20)) # _Chai Wah Wu_, Mar 14 2023
%Y A132199 Cf. A106108, A137613, A134734, A134743, A134744, A191304 (record highs) A247090. See A106108 for other cross-references.
%K A132199 nonn
%O A132199 1,4
%A A132199 _N. J. A. Sloane_, Jan 28 2008