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-3 of 3 results.

A056815 Primes with prime "look and say" descriptions.

Original entry on oeis.org

3, 7, 17, 23, 113, 127, 137, 193, 199, 223, 233, 271, 311, 313, 331, 359, 367, 373, 431, 433, 439, 463, 479, 499, 503, 523, 587, 607, 641, 677, 691, 733, 757, 773, 797, 809, 821, 823, 829, 853, 919, 997, 1009, 1069, 1123, 1129, 1171, 1181, 1187, 1223, 1277
Offset: 1

Views

Author

Joseph L. Pe, Jan 30 2003

Keywords

Comments

The "look and say" descriptions of some of these primes are themselves also terms of this sequence (for example, the one for 373). - Alonso del Arte, Mar 01 2012

Examples

			193 is prime and its "look and say" description A045918(193) = 111913, is also prime, so 193 belongs to the sequence.
		

References

  • David Wells, Prime Numbers: The Most Mysterious Figures in Math. Hoboken, New Jersey: John Wiley & Sons (2005): 41.

Crossrefs

Programs

  • Haskell
    a056815 n = a056815_list !! (n-1)
    a056815_list = filter ((== 1) . a010051' . a045918) a000040_list
    -- Reinhard Zumkeller, Apr 14 2014
    
  • Mathematica
    LookAndSayA[ n_] := FromDigits@Flatten@((Through[ {Length, First}[ # ] ] &) /@ Split@IntegerDigits@n); Select[Prime@Range[210], PrimeQ@LookAndSayA@# &] (* Ray Chandler, Jan 12 2007 *)
    (* Emmanuel Vantieghem, Jan 26 2012, reports that the above Mma program is incorrect, because the LookAndSayA function can give wrong answers. Here is a better function (b and c to be substituted by suitable numbers): *)
    LookAndSayA[n_] := FromDigits@Flatten@(IntegerDigits/@Flatten@
    ((Through[{Length, First}[#]]&)/@Split@IntegerDigits@n)); W=Select[Prime@Range[b, c], PrimeQ@LookAndSayA@#&]
    (* Robert G. Wilson v then commented (Jan 27 2012) that the following version is cleaner: *)
    LookAndSayA[n_] := FromDigits@ Flatten@ IntegerDigits@ Flatten[
    Through[{Length, First}[#]] & /@ Split@ IntegerDigits@ n]
  • PARI
    forprime(p=1,999, isprime(A045918(p)) & print1(p","))  \\ M. F. Hasler, Jan 27 2012
    
  • Python
    from sympy import isprime, sieve
    from itertools import groupby, islice
    def LS(n): return int(''.join(str(len(list(g)))+k for k, g in groupby(str(n))))
    def agen(): yield from (p for p in sieve if isprime(LS(p)))
    print(list(islice(agen(), 51))) # Michael S. Branicky, Feb 03 2023

Formula

A010051(a(n)) * A010051(A045918(a(n))) = 1. - Reinhard Zumkeller, Apr 14 2014

Extensions

Discussion of Mma program added Feb 02 2012 by N. J. A. Sloane

A127179 Primes with prime "Look And Say" descriptions from right to left (irrespective of method A or method B).

Original entry on oeis.org

3, 7, 71, 103, 311, 349, 757, 1297, 1327, 1811, 1993, 1999, 3119, 3709, 7027, 7297, 7573, 7603, 7639, 7873, 7883, 7963, 9001, 9043, 9311, 9613, 9677, 10739, 11159, 11177, 13121, 13553, 13721, 13751, 14369, 14831, 14897, 14939, 14951, 15329
Offset: 1

Views

Author

Lekraj Beedassy, Jan 07 2007

Keywords

Examples

			71 and 311, for instance, belongs to the sequence because their respective descriptions 1117 (one 1, one 7) or 1171 (1 once, 7 once) and 2113 (two 1's, one 3) or 1231 (1 twice, 3 once) are all primes.
		

Crossrefs

Formula

Intersection of A127177 and A127178.

Extensions

Extended by Ray Chandler, Jan 16 2007

A127175 Primes whose "Look And Say" descriptions from left to right (in the sense of method B, i.e., digit-indication followed by frequency) are also primes.

Original entry on oeis.org

3, 7, 17, 23, 41, 89, 113, 131, 137, 163, 179, 193, 271, 281, 283, 337, 389, 431, 443, 457, 479, 587, 593, 613, 661, 673, 683, 691, 727, 739, 757, 787, 809, 829, 863, 883, 907, 983, 1009, 1051, 1087, 1123, 1153, 1163, 1181, 1213, 1229, 1249, 1279, 1297
Offset: 1

Views

Author

Lekraj Beedassy, Jan 07 2007

Keywords

Examples

			41, 337, 809, 1123, for instance, are in the sequence because their respective descriptions 4111 (4 once, 1 once), 3271 (3 twice, 7 once), 810191 (8 once, 0 once, 9 once), 122131 (1 twice, 2 once, 3 once) are also primes.
		

Crossrefs

Programs

  • Mathematica
    LookAndSayB[ n_] := FromDigits@Flatten@((Through[ {First, Length}[ # ] ] &) /@ Split@IntegerDigits@n); Select[Prime@Range[215], PrimeQ@LookAndSayB@# &] (* Ray Chandler, Jan 08 2007 *)

Extensions

Corrected by Ray Chandler, Jan 08 2007
Showing 1-3 of 3 results.