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.

A081981 Primes p such that p+1 is divisible by every nonzero digit of p.

This page as a plain text file.
%I A081981 #21 Jul 23 2025 14:42:47
%S A081981 11,23,101,113,131,167,211,233,263,269,311,359,383,431,443,727,863,
%T A081981 1013,1021,1031,1061,1103,1163,1201,1217,1223,1259,1301,1361,1427,
%U A081981 1439,1601,1613,1619,1637,1721,1777,1823,1847,2003,2011,2063,2069,2111,2213,2221
%N A081981 Primes p such that p+1 is divisible by every nonzero digit of p.
%H A081981 Robert Israel, <a href="/A081981/b081981.txt">Table of n, a(n) for n = 1..10000</a>
%F A081981 a(n) = 576n log n + O(n^0.955), since primes = 2519 mod 2520 are all in this sequence, and almost all (in the sense of natural density) terms of this sequence are of that form. - _Charles R Greathouse IV_, Sep 06 2022
%e A081981 167 is a member as 168 is divisible by 1, 6 and 7.
%p A081981 filter:= proc(n)
%p A081981   isprime(n) and n+1 mod ilcm(subs(0=NULL,convert(n,base,10))) = 0
%p A081981 end proc:
%p A081981 select(filter, [seq(i,i=3..10000,2)]); # _Robert Israel_, Jul 23 2025
%o A081981 (Python)
%o A081981 from sympy import isprime
%o A081981 def ok(n): return all((n+1)%int(d) == 0 for d in set(str(n)) - {"0"}) and isprime(n)
%o A081981 print([k for k in range(2222) if ok(k)]) # _Michael S. Branicky_, Sep 06 2022
%Y A081981 Cf. A081982, A081983, A081984, A081986, A081987, A179520.
%K A081981 base,nonn
%O A081981 1,1
%A A081981 _Amarnath Murthy_, Apr 04 2003
%E A081981 More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 06 2003
%E A081981 Added "nonzero" to definition following a comment by Harvey Dale. - _N. J. A. Sloane_, Jan 08 2011.