A369096 Numbers k >= 2 such that omega(k) divides the sum of the triangular numbers T(k) and T(k+1), where omega(k) is the number of distinct primes dividing k (A001221).
2, 3, 4, 5, 7, 8, 9, 11, 13, 15, 16, 17, 19, 21, 23, 25, 27, 29, 31, 32, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 64, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 107, 109, 110, 111, 113, 115, 117, 119, 121, 123, 125, 127, 128, 129
Offset: 1
Examples
2 is a term since (2+1)^2 = 3^2 = 9 is divisible by omega(2) = 1. 15 is a term since (15+1)^2 = 16^2 = 256 is divisible by omega(15) = 2. 12 is not a term since (12+1)^2 = 13^2 = 169 is not divisible by omega(12) = 2.
Programs
-
Maple
isA369096 := proc(k) if modp((k+1)^2, A001221(k)) = 0 then true; else false; end if; end proc: A369096 := proc(n) option remember ; if n = 1 then 2; else for a from procname(n-1)+1 do if isA369096(a) then return a; end if; end do: end if; end proc: [seq(A369096(n),n=1..100)] ; # R. J. Mathar, Jan 18 2024
-
PARI
isok(n)=my(x=(n+1)^2,y=omega(n));!(x%y);
Comments