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.

Showing 1-2 of 2 results.

A030471 Primes which are concatenations of four consecutive numbers.

Original entry on oeis.org

4567, 14151617, 20212223, 34353637, 58596061, 64656667, 118119120121, 140141142143, 148149150151, 176177178179, 196197198199, 218219220221, 220221222223, 236237238239, 238239240241, 268269270271, 278279280281
Offset: 1

Views

Author

Keywords

Comments

There are no primes which are concatenations of three consecutive numbers (A001703), in fact all such concatenations are divisible by 3. - Zak Seidov, Oct 25 2014

Crossrefs

Programs

  • Mathematica
    A279204[n_] := FromDigits[Flatten[IntegerDigits[Range[n, n + 3]]]];
    Select[Array[A279204, 500], PrimeQ] (* Paolo Xausa, Aug 26 2024 *)
  • PARI
    lista(nn) = for(n=1, nn, if (isprime(q=eval(concat(concat(concat(Str(n), Str(n+1)), Str(n+2)), Str(n+3)))), print1(q, ", "))); \\ Michel Marcus, Oct 26 2014
    
  • Python
    from sympy import isprime
    from itertools import count, islice
    def agen(): # generator of terms
        strs = ["1", "2", "3", "4"]
        for k in count(1):
            if isprime(t:=int("".join(strs))): yield t
            strs = strs[1:] + [str(k+4)]
    print(list(islice(agen(), 20))) # Michael S. Branicky, Aug 26 2024

Extensions

Edited by Charles R Greathouse IV, Apr 23 2010

A262193 Primes that are a concatenation of ten consecutive numbers.

Original entry on oeis.org

45678910111213, 20212223242526272829, 68697071727374757677, 88899091929394959697, 122123124125126127128129130131, 140141142143144145146147148149, 188189190191192193194195196197, 200201202203204205206207208209, 212213214215216217218219220221
Offset: 1

Views

Author

Altug Alkan, Sep 14 2015

Keywords

Examples

			4_5_6_7_8_9_10_11_12_13 is a prime number.
		

Crossrefs

Programs

  • Mathematica
    Select[FromDigits[Flatten[IntegerDigits[#]]]&/@Partition[Range[300], 10, 1], PrimeQ] (* Vincenzo Librandi, Sep 15 2015 *)
  • PARI
    for(n=1, 1e3, if(isprime(k=eval(Str(n, n+1, n+2, n+3, n+4, n+5, n+6, n+7, n+8, n+9))), print1(k", ")))
Showing 1-2 of 2 results.