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.

A030145 Primes such that in p^2 the parity of digits alternates.

This page as a plain text file.
%I A030145 #11 Jul 30 2019 15:33:51
%S A030145 2,3,5,7,11,13,19,23,31,113,127,137,181,269,277,281,311,461,463,661,
%T A030145 673,677,1019,1277,1361,1973,2287,2339,2377,2411,2423,2689,2731,4673,
%U A030145 5023,5081,5261,6563,6577,8311,9013,9437,9439,10181,10463
%N A030145 Primes such that in p^2 the parity of digits alternates.
%H A030145 Giovanni Resta, <a href="/A030145/b030145.txt">Table of n, a(n) for n = 1..10000</a>
%F A030145 a(n)^2 = A030146(n). - _Giovanni Resta_, Aug 16 2018
%t A030145 id[n_]:=IntegerDigits[n]; t={}; Do[p=Prime[n]; If[Length[id[p]]==1,AppendTo[t,p], If[Union[Abs[Differences[Boole/@EvenQ[id[p^2]]]]]=={1}, AppendTo[t,p]]], {n,1300}]; t (* _Jayanta Basu_, May 07 2013 *)
%t A030145 pdaQ[n_]:=FreeQ[Differences[Boole[EvenQ[IntegerDigits[n^2]]]],0]; Select[ Prime[ Range[1300]],pdaQ] (* _Harvey P. Dale_, Jul 30 2019 *)
%Y A030145 Cf. A030144, A030146, A030151.
%K A030145 nonn,base
%O A030145 1,1
%A A030145 _Patrick De Geest_
%E A030145 Offset corrected by _Giovanni Resta_, Aug 16 2018