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

 Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 60th year, we have over 367,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”). Other ways to Give
 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A242541 Undulating primes: prime numbers whose digits follow the pattern A, B, A, B, A, B, A, B, ... 5
 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 131, 151, 181, 191, 313, 353, 373, 383, 727, 757, 787, 797, 919, 929, 18181, 32323, 35353, 72727, 74747, 78787, 94949, 95959, 1212121, 1616161, 323232323 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS All numbers in this sequence with three or more digits must have an odd number of digits. Any number with an even number of digits that follow this pattern is divisible by a number of the form 1010101...1010101 where the number of digits is one less than the number of digits in the original number. Union of A004022 and A032758. - Arkadiusz Wesolowski, May 17 2014 Because A may equal B, 11 (and other prime repunits) are terms in this sequence (but not of A032758). - Harvey P. Dale, May 26 2015 LINKS Harvey P. Dale, Table of n, a(n) for n = 1..135 EXAMPLE 121 = 11*11 is not prime and thus is not a term of this sequence. MAPLE select(isprime, [\$0..99, seq(seq(seq(a*(10^(d+1)-10^(d+1 mod 2))/99 + b*(10^d - 10^(d mod 2))/99, b=0..9), a=1..9, 2), d=3..9, 2)]); # Robert Israel, Jul 08 2016 MATHEMATICA Select[Union[Flatten[Table[FromDigits[PadRight[{}, n, #]], {n, 9}]&/@ Tuples[ Range[0, 9], 2]]], PrimeQ] (* Harvey P. Dale, May 26 2015 *) PROG (Python) from itertools import count, islice from sympy import isprime, primerange def agen(): # generator of terms yield from primerange(2, 100) yield from (t for t in (int((A+B)*d2+A) for d2 in count(1) for A in "1379" for B in "0123456789") if isprime(t)) print(list(islice(agen(), 51))) # Michael S. Branicky, Jun 09 2022 CROSSREFS Cf. A004022, A032758, A033619. Sequence in context: A049585 A049549 A030291 * A052085 A082646 A231588 Adjacent sequences: A242538 A242539 A242540 * A242542 A242543 A242544 KEYWORD nonn,base AUTHOR J. Lowell, May 17 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 December 7 11:41 EST 2023. Contains 367656 sequences. (Running on oeis4.)