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.

A137613 Omit the 1's from Rowland's sequence f(n) - f(n-1) = gcd(n,f(n-1)), where f(1) = 7.

This page as a plain text file.
%I A137613 #88 Aug 12 2023 00:57:41
%S A137613 5,3,11,3,23,3,47,3,5,3,101,3,7,11,3,13,233,3,467,3,5,3,941,3,7,1889,
%T A137613 3,3779,3,7559,3,13,15131,3,53,3,7,30323,3,60647,3,5,3,101,3,121403,3,
%U A137613 242807,3,5,3,19,7,5,3,47,3,37,5,3,17,3,199,53,3,29,3,486041,3,7,421,23
%N A137613 Omit the 1's from Rowland's sequence f(n) - f(n-1) = gcd(n,f(n-1)), where f(1) = 7.
%C A137613 Rowland proves that each term is prime. He says it is likely that all odd primes occur.
%C A137613 In the first 5000 terms, there are 965 distinct primes and 397 is the least odd prime that does not appear. - _T. D. Noe_, Mar 01 2008
%C A137613 In the first 10000 terms, the least odd prime that does not appear is 587, according to Rowland. - _Jonathan Sondow_, Aug 14 2008
%C A137613 Removing duplicates from this sequence yields A221869. The duplicates are A225487. - _Jonathan Sondow_, May 03 2013
%H A137613 T. D. Noe, <a href="/A137613/b137613.txt">Table of n, a(n) for n = 1..5000</a>
%H A137613 Jean-Paul Delahaye, <a href="https://www.pourlascience.fr/sr/logique-calcul/deconcertantes-conjectures-3819.php">Déconcertantes conjectures</a>, Pour la science, 5 (2008), 92-97.
%H A137613 Brian Hayes, <a href="http://bit-player.org/2015/pumping-the-primes">Pumping the Primes</a>, bit-player, 19 August 2015.
%H A137613 John Moyer, <a href="http://www.rsok.com/~jrm/source/find_primes_rowland/">Source code in C and C++ to print this sequence or sorted and unique values from this sequence</a>. [From John Moyer (jrm(AT)rsok.com), Nov 06 2009]
%H A137613 Ivars Peterson, <a href="http://www.maa.org/mathtourist/mathtourist_8_8_08.html">A New Formula for Generating Primes</a>, The Mathematical Tourist.
%H A137613 Eric S. Rowland, A simple prime-generating recurrence, Abstracts Amer. Math. Soc. 29 (No. 1, 2008), p. 50 (Abstract 1035-11-986).
%H A137613 Eric S. Rowland, <a href="https://arxiv.org/abs/0710.3217">A natural prime-generating recurrence</a>, arXiv:0710.3217 [math.NT], 2007-2008.
%H A137613 Eric S. Rowland, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL11/Rowland/rowland21.html">A natural prime-generating recurrence</a>, J. of Integer Sequences 11 (2008), Article 08.2.8.
%H A137613 Eric Rowland, <a href="http://thenksblog.wordpress.com/2008/07/21/a-simple-recurrence-that-produces-complex-behavior-and-primes/">A simple recurrence that produces complex behavior ...</a>, A New Kind of Science blog.
%H A137613 Eric Rowland, <a href="http://demonstrations.wolfram.com/PrimeGeneratingRecurrence/">Prime-Generating Recurrence</a>, Wolfram Demonstrations Project, 2008.
%H A137613 Eric Rowland, <a href="https://www.youtube.com/watch?v=OpaKpzMFOpg">A Bizarre Way to Generate Primes</a>, YouTube video, 2023.
%H A137613 Jeffrey Shallit, <a href="http://recursed.blogspot.com/2008/07/rutgers-graduate-student-finds-new.html">Rutgers Graduate Student Finds New Prime-Generating Formula</a>, Recursivity blog.
%H A137613 Vladimir Shevelev, <a href="http://arxiv.org/abs/0911.3491">Generalizations of the Rowland theorem</a>, arXiv:0911.3491 [math.NT], 2009-2010.
%H A137613 Wikipedia, <a href="http://en.wikipedia.org/wiki/Formula_for_primes#Recurrence_relation">Formula for primes</a>.
%F A137613 Denote by Lpf(n) the least prime factor of n. Then a(n) = Lpf( 6-n+Sum_{i=1..n-1} a(i) ). - _Vladimir Shevelev_, Mar 03 2010
%F A137613 a(n) = A168008(2*n+4) (conjectured). - _Jon Maiga_, May 20 2021
%F A137613 a(n) = A020639(A190894(n)). - _Seiichi Manyama_, Aug 11 2023
%e A137613 f(n) = 7, 8, 9, 10, 15, 18, 19, 20, ..., so f(n) - f(n-1) = 1, 1, 1, 5, 3, 1, 1, ... and a(n) = 5, 3, ... .
%e A137613 From _Vladimir Shevelev_, Mar 03 2010: (Start)
%e A137613   a(1) = Lpf(6-1) = 5;
%e A137613   a(2) = Lpf(6-2+5) = 3;
%e A137613   a(3) = Lpf(6-3+5+3) = 11;
%e A137613   a(4) = Lpf(6-4+5+3+11) = 3;
%e A137613   a(5) = Lpf(6-5+5+3+11+3) = 23. (End)
%p A137613 A137613_list := proc(n)
%p A137613 local a, c, k, L;
%p A137613 L := NULL; a := 7;
%p A137613 for k from 2 to n do
%p A137613     c := igcd(k,a);
%p A137613     a := a + c;
%p A137613     if c > 1 then L:=L,c fi;
%p A137613 od;
%p A137613 L end:
%p A137613 A137613_list(500000); # _Peter Luschny_, Nov 17 2011
%t A137613 f[1] = 7; f[n_] := f[n] = f[n - 1] + GCD[n, f[n - 1]]; DeleteCases[Differences[Table[f[n], {n, 10^6}]], 1] (* _Alonso del Arte_, Nov 17 2011 *)
%o A137613 (Haskell)
%o A137613 a137613 n = a137613_list !! (n-1)
%o A137613 a137613_list =  filter (> 1) a132199_list
%o A137613 -- _Reinhard Zumkeller_, Nov 15 2013
%o A137613 (PARI)
%o A137613 ub=1000; n=3; a=9; while(n<ub, m=a\n; d=factor((m-1)*n-1)[1,1]; print1(d,", "); n=n+((d-1)\(m-1)); a=m*n; ); \\ _Daniel Constantin Mayer_, Aug 31 2014
%o A137613 (Python)
%o A137613 from itertools import count, islice
%o A137613 from math import gcd
%o A137613 def A137613_gen(): # generator of terms
%o A137613     a = 7
%o A137613     for n in count(2):
%o A137613         if (b:=gcd(a,n)) > 1: yield b
%o A137613         a += b
%o A137613 A137613_list = list(islice(A137613_gen(),20)) # _Chai Wah Wu_, Mar 14 2023
%Y A137613 f(n) = f(n-1) + gcd(n, f(n-1)) = A106108(n) and f(n) - f(n-1) = A132199(n-1).
%Y A137613 Cf. also A084662, A084663, A134734, A134736, A134743, A134744, A221869.
%Y A137613 Cf. A020639, A168008, A190894, A231900.
%K A137613 nonn
%O A137613 1,1
%A A137613 _Jonathan Sondow_, Jan 29 2008, Jan 30 2008