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.

A182175 Numbers with the property that every pair of adjacent digits sum to a prime number.

This page as a plain text file.
%I A182175 #36 Jun 12 2025 03:39:50
%S A182175 0,1,2,3,4,5,6,7,8,9,11,12,14,16,20,21,23,25,29,30,32,34,38,41,43,47,
%T A182175 49,50,52,56,58,61,65,67,70,74,76,83,85,89,92,94,98,111,112,114,116,
%U A182175 120,121,123,125,129,141,143,147,149,161,165,167,202,203,205,207,211,212,214,216,230,232,234
%N A182175 Numbers with the property that every pair of adjacent digits sum to a prime number.
%C A182175 Complement of A219110. - _M. F. Hasler_, Apr 11 2013
%H A182175 Zak Seidov, <a href="/A182175/b182175.txt">Table of n, a(n) for n = 1..10000</a>
%e A182175 983 is in the sequence since 9+8 is prime and 8+3 is prime.
%p A182175 N:= 4: # to get all terms with up to N digits.
%p A182175 for p from 0 to 9 do P[p]:= select(t -> isprime(t+p),[$0..9]) od:
%p A182175 F:= proc(t) local r,p; r:= t mod 10; op(map(`+`,P[r],10*t)) end proc:
%p A182175 S[1]:= {$1..9}:
%p A182175 for j from 2 to N do S[j]:= map(F,S[j-1]) od:
%p A182175 `union`({0},seq(S[j],j=1..N));
%p A182175 # if using Maple 11 or lower, uncomment the next line:
%p A182175 # sort(convert(%,list));
%p A182175 # _Robert Israel_, Oct 27 2014
%t A182175 fQ[n_] := Module[{d = IntegerDigits[n], s}, s = Most[d] + Rest[d]; And @@ PrimeQ[s]]; Flatten[Join[{Range[0,9],Select[Range[11, 300], fQ]}]] (* _T. D. Noe_, Aug 21 2012 and Apr 17 2013; modified by _Zak Seidov_, Oct 28 2014 *)
%o A182175 (PARI) is_A182175(n)=!for(i=2, #n=digits(n), isprime(n[i-1]+n[i])||return) \\ _M. F. Hasler_, Oct 27 2014
%Y A182175 These are the candidate numbers for extending A182178.
%Y A182175 Cf. A219110.
%K A182175 nonn,base
%O A182175 1,3
%A A182175 _Jim Nastos_, Apr 16 2012