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.
%I A333197 #27 Dec 20 2024 19:12:32 %S A333197 1,4,6,8,10,12,14,16,20,22,24,28,32,38,40,44,46,48,58,62,74,80,82,88, %T A333197 96,106,148,158,164,166,178,194,212,226,262,278,314,316,332,346,358, %U A333197 382,388,398,422,458,466,478,502,524,542,556,562,586,614,632,662,674 %N A333197 Nonprime numbers k such that each nonprime divisor of k is 1 away from a prime number. %C A333197 Let {d(i), i = 1..q} be the set of the q nonprime divisors of a number m. The sequence lists the nonprime numbers such that |d(i) - p(i)| = 1 for all i, where p(i) is prime. %C A333197 Conjecture: except for a(n) = 4, 8, 16 and 32, a(n) is of the form 2^i*p^j with p = 3, 5, 7, 11, 19, 23, 29, 31, ... ({A120628} minus {2}). %C A333197 Consequence: 2 * A120628(k) is in the sequence for k >= 1. %C A333197 Note that all nonprime divisors of a term of the sequence must be 1 or even. Thus a term of the sequence can have at most one odd prime divisor, i.e., it is a power of 2 or 2^i*p where p is an odd prime. In the latter case, since 2*p is a nonprime divisor, p must be in A120628. - _Robert Israel_, Apr 12 2020 %H A333197 Robert Israel, <a href="/A333197/b333197.txt">Table of n, a(n) for n = 1..10000</a> %e A333197 48 is in the sequence because the nonprime divisors of 48 are {1, 4, 6, 8, 12, 16, 24, 48} and: %e A333197 |1 - 2| = 1, %e A333197 |4 - 5| = 1 (or |4 - 3| = 1), %e A333197 |6 - 7| = 1 (or |6 - 5| = 1), %e A333197 |8 - 7| = 1, %e A333197 |12 - 13| = 1 (or |12 - 11| = 1), %e A333197 |16 - 17| = 1, %e A333197 |24 - 23| = 1, %e A333197 |48 - 47| = 1. %p A333197 with(numtheory): %p A333197 for n from 1 to 50 do: %p A333197 if type(n,prime)=false %p A333197 then %p A333197 d:=divisors(n):n0:=nops(d):it:=0: %p A333197 for k from 1 to n0 do : %p A333197 if nextprime(d[k])- d[k]= 1 %p A333197 or %p A333197 d[k] - prevprime(d[k])= 1 %p A333197 or %p A333197 isprime(d[k]) %p A333197 then %p A333197 it:=it+1: %p A333197 eles %p A333197 fi: %p A333197 od: %p A333197 if it=n0 %p A333197 then %p A333197 printf(`%d, `,n): %p A333197 else fi: %p A333197 fi: %p A333197 od: %p A333197 # Alternative: %p A333197 N:= 1000: # for terms <= N %p A333197 P,NP:= selectremove(isprime, [$1..N]): %p A333197 P:= convert(P,set): %p A333197 P1:= P union map(`+`,P,1) union map(`-`,P,1): %p A333197 filter:= proc(n) numtheory:-divisors(n) subset P1 end proc: %p A333197 select(filter, NP); # _Robert Israel_, Apr 12 2020 %t A333197 seqQ[n_] := !PrimeQ[n] && AllTrue[Divisors[n], AnyTrue[# + {-1,0,1}, PrimeQ] &]; Select[Range[700], seqQ] (* _Amiram Eldar_, Mar 11 2020 *) %o A333197 (PARI) isok(m) = !isprime(m) && (sumdiv(m, d, !isprime(d) && (isprime(d+1) || ((d>1) && isprime(d-1)))) == sumdiv(m, d, !isprime(d))); \\ _Michel Marcus_, Mar 11 2020 %Y A333197 Cf. A002808, A018252, A120628, A334026. %K A333197 nonn %O A333197 1,2 %A A333197 _Michel Lagneau_, Mar 11 2020