login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Numbers which cannot be expressed as a sum 1 + p1 + p1*p2 + p1*p2*p3 + ... for some collection of primes {p1, p2, p3, ...}.
2

%I #24 Nov 11 2020 03:09:52

%S 2,5,11,23,26,47,56,95,116,122,236,254,518,530,1082,2210

%N Numbers which cannot be expressed as a sum 1 + p1 + p1*p2 + p1*p2*p3 + ... for some collection of primes {p1, p2, p3, ...}.

%C I conjecture, but have not been able to prove, that this sequence is finite with only the terms given above. In that case it can be constructed by taking a1=2, and adjoining all numbers aj*ak + 1, where aj and ak are two prime members of the sequence.

%C Any number which can be expressed as p*q + 1, where p is prime and q does not belong to the sequence, does not belong to the sequence either.

%F A317240(a(n)) = 0. - _Alois P. Heinz_, Jul 24 2018

%e 8 is not a member of the sequence since it is equal to 1 + 7.

%e 9 is not a member of the sequence since it can be written 1 + 2 + 2*3.

%e 10 is not a member of the sequence since it is equal to 1 + 3 + 3*2.

%e 11 is a member of the sequence. If 11 could be written in this form, then p1 must divide 10. We would have 11 = 1 + p1(1 + p2 + ...), which would imply that 5 is not a member of the sequence if p1 = 2, or vice versa. Since both 2 nor 5 are members, so is 11.

%p q:= proc(n) option remember; is(n=1 or ormap(p->

%p q((n-1)/p), numtheory[factorset](n-1)))

%p end:

%p remove(q, [$1..3000])[]; # _Alois P. Heinz_, Jul 24 2018

%t q[1] = True; q[2] = False;

%t q[n_] := q[n] = AnyTrue[FactorInteger[n-1][[All, 1]], q[(n-1)/#]&];

%t Select[Range[3000], !q[#]&] (* _Jean-François Alcover_, Nov 11 2020, after _Alois P. Heinz_ *)

%o (Perl) #!/usr/bin/perl $max = 10; if (defined($ARGV[0])) { $max = $ARGV[0]; } $primes{1} = 0; $list{1} = 1; $list{2} = 0; print "2, "; foreach $k (2..$max){ $p = 1; $l = 0; foreach $j (1..$k) { if ($primes{$j}){ if (($k % $j) == 0){ $p = 0; if ($list{$k / $j}){ $l = 1; } } } } $primes{$k} = $p; $list{$k + 1} = $l || $p; if (!$list{$k + 1}){ $t = $k + 1; print "$t, " } }

%Y All terms given above belong to A009293.

%Y Cf. A317240, A317242.

%K nonn

%O 1,1

%A _Jack W Grahl_, Aug 28 2010