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!)
A137613 Omit the 1's from Rowland's sequence f(n) - f(n-1) = gcd(n,f(n-1)), where f(1) = 7. 11

%I #88 Aug 12 2023 00:57:41

%S 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 3,3779,3,7559,3,13,15131,3,53,3,7,30323,3,60647,3,5,3,101,3,121403,3,

%U 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 Omit the 1's from Rowland's sequence f(n) - f(n-1) = gcd(n,f(n-1)), where f(1) = 7.

%C Rowland proves that each term is prime. He says it is likely that all odd primes occur.

%C 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 In the first 10000 terms, the least odd prime that does not appear is 587, according to Rowland. - _Jonathan Sondow_, Aug 14 2008

%C Removing duplicates from this sequence yields A221869. The duplicates are A225487. - _Jonathan Sondow_, May 03 2013

%H T. D. Noe, <a href="/A137613/b137613.txt">Table of n, a(n) for n = 1..5000</a>

%H 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 Brian Hayes, <a href="http://bit-player.org/2015/pumping-the-primes">Pumping the Primes</a>, bit-player, 19 August 2015.

%H 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 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 Eric S. Rowland, A simple prime-generating recurrence, Abstracts Amer. Math. Soc. 29 (No. 1, 2008), p. 50 (Abstract 1035-11-986).

%H 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 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 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 Eric Rowland, <a href="http://demonstrations.wolfram.com/PrimeGeneratingRecurrence/">Prime-Generating Recurrence</a>, Wolfram Demonstrations Project, 2008.

%H Eric Rowland, <a href="https://www.youtube.com/watch?v=OpaKpzMFOpg">A Bizarre Way to Generate Primes</a>, YouTube video, 2023.

%H 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 Vladimir Shevelev, <a href="http://arxiv.org/abs/0911.3491">Generalizations of the Rowland theorem</a>, arXiv:0911.3491 [math.NT], 2009-2010.

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Formula_for_primes#Recurrence_relation">Formula for primes</a>.

%F 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 a(n) = A168008(2*n+4) (conjectured). - _Jon Maiga_, May 20 2021

%F a(n) = A020639(A190894(n)). - _Seiichi Manyama_, Aug 11 2023

%e 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 From _Vladimir Shevelev_, Mar 03 2010: (Start)

%e a(1) = Lpf(6-1) = 5;

%e a(2) = Lpf(6-2+5) = 3;

%e a(3) = Lpf(6-3+5+3) = 11;

%e a(4) = Lpf(6-4+5+3+11) = 3;

%e a(5) = Lpf(6-5+5+3+11+3) = 23. (End)

%p A137613_list := proc(n)

%p local a, c, k, L;

%p L := NULL; a := 7;

%p for k from 2 to n do

%p c := igcd(k,a);

%p a := a + c;

%p if c > 1 then L:=L,c fi;

%p od;

%p L end:

%p A137613_list(500000); # _Peter Luschny_, Nov 17 2011

%t 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 (Haskell)

%o a137613 n = a137613_list !! (n-1)

%o a137613_list = filter (> 1) a132199_list

%o -- _Reinhard Zumkeller_, Nov 15 2013

%o (PARI)

%o 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 (Python)

%o from itertools import count, islice

%o from math import gcd

%o def A137613_gen(): # generator of terms

%o a = 7

%o for n in count(2):

%o if (b:=gcd(a,n)) > 1: yield b

%o a += b

%o A137613_list = list(islice(A137613_gen(),20)) # _Chai Wah Wu_, Mar 14 2023

%Y f(n) = f(n-1) + gcd(n, f(n-1)) = A106108(n) and f(n) - f(n-1) = A132199(n-1).

%Y Cf. also A084662, A084663, A134734, A134736, A134743, A134744, A221869.

%Y Cf. A020639, A168008, A190894, A231900.

%K nonn

%O 1,1

%A _Jonathan Sondow_, Jan 29 2008, Jan 30 2008

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 April 25 13:02 EDT 2024. Contains 371969 sequences. (Running on oeis4.)