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.

A083972 Smallest palindromic prime containing exactly n 1's.

This page as a plain text file.
%I A083972 #23 Mar 25 2019 04:23:24
%S A083972 313,11,18181,11311,1311131,1114111,110111011,111181111,11115151111,
%T A083972 1011117111101,1110111110111,1111118111111,111111212111111,
%U A083972 111111151111111,11121111111112111,1011111110111111101,1111111611161111111,111110111171111011111,1111111111111111111,111111111161111111111,11111111181118111111111,1101111111119111111111011
%N A083972 Smallest palindromic prime containing exactly n 1's.
%H A083972 Chai Wah Wu, <a href="/A083972/b083972.txt">Table of n, a(n) for n = 1..500</a>
%t A083972 digOfInterest = 1;
%t A083972 primes = {};
%t A083972 While[Length[primes] < 6,
%t A083972   n = Length[primes] + 1;
%t A083972   i = 0;
%t A083972   While[Length[primes] != n,
%t A083972    i++;
%t A083972    dig = IntegerDigits[Prime[i]];
%t A083972    If[
%t A083972     (dig == Reverse[dig]) &&
%t A083972      (Count[dig, digOfInterest] == n),
%t A083972     AppendTo[primes, FromDigits[dig]];
%t A083972     ];
%t A083972    ];
%t A083972   ];
%t A083972 primes
%t A083972 (* _Kevin Southwick_, Jul 25 2015 *)
%Y A083972 Cf. A083973, A083974, A083975, A083976, A083977, A083978, A083979, A083980, A083981.
%K A083972 base,nonn
%O A083972 1,1
%A A083972 _Amarnath Murthy_ and Meenakshi Srikanth (menakan_s(AT)yahoo.com), May 21 2003
%E A083972 More terms from _David Wasserman_, Dec 06 2004
%E A083972 Corrected and extended by _Giovanni Resta_, Feb 08 2006
%E A083972 2 more terms from _Erich Friedman_, Mar 23 2008