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.

A073867 Smallest prime whose digital sum is equal to the n-th composite number, or 0 if no such prime exists.

This page as a plain text file.
%I A073867 #10 Dec 21 2024 17:59:23
%S A073867 13,0,17,0,19,0,59,0,79,0,389,0,499,0,997,1889,0,1999,0,6899,0,17989,
%T A073867 8999,0,39989,0,49999,0,98999,0,199999,0,598999,599999,0,799999,0,
%U A073867 2998999,2999999,0,4999999,0,9899999,0,19999999,29999999,0,59999999,0
%N A073867 Smallest prime whose digital sum is equal to the n-th composite number, or 0 if no such prime exists.
%H A073867 Sean A. Irvine, <a href="/A073867/b073867.txt">Table of n, a(n) for n = 1..1000</a>
%F A073867 a(n)=0 iff that composite number (A002808(n)) is congruent to 0 (modulo 3), otherwise a(n)=A007605(k) for the first k that equals A002808(n).
%e A073867 The first composite number (A002808) is 4 and the least prime whose digital sum is 4 is 13.
%e A073867 The second composite number (A002808) is 6 whose digital sum is == 0 (mod 3) so there is no prime whose fits the definition.
%t A073867 Composite[n_] := FixedPoint[n + PrimePi[ # ] + 1 &, n]; f[n_] := Block[{cn = Composite[n]}, k = 1; While[Plus @@ IntegerDigits@Prime@k != cn, k++ ]; Prime[k]];
%Y A073867 Equals A067180(A002808(n)). Cf. A111397.
%K A073867 nonn,base
%O A073867 1,1
%A A073867 _Amarnath Murthy_, Aug 15 2002
%E A073867 a(19)-a(32) from _Stefan Steinerberger_, Nov 09 2005
%E A073867 a(33)-a(56) by _Robert G. Wilson v_, Nov 10 2005