A061715 Numbers which are sandwiched between two numbers having the same ordered canonical form.
4, 6, 12, 18, 30, 34, 42, 56, 60, 72, 86, 92, 94, 102, 108, 138, 142, 144, 150, 160, 180, 184, 186, 192, 198, 202, 204, 214, 216, 218, 220, 228, 236, 240, 248, 266, 270, 282, 300, 302, 304, 312, 320, 322, 328, 340, 348, 392, 394, 412, 414, 416, 420, 424, 432
Offset: 1
Examples
34 is sandwiched between 33 and 35 which are of the form p*q where p and q are primes.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Maple
isA061715 := proc(n) local nm1,np1 ; nm1 := ifactors(n-1)[2] ; np1 := ifactors(n+1)[2] ; if nops(nm1) = nops(np1) then for i from 1 to nops(nm1) do if op(2,op(i,nm1)) <> op(2,op(i,np1)) then return false; end if; end do: true ; else false; end if; end proc: for n from 1 to 300 do if isA061715(n) then printf("%d,",n); end if; end do: # R. J. Mathar, Jan 18 2017
-
Mathematica
f[n_] := Flatten[Table[{ # [[2]]}] & /@ FactorInteger[n]]; Drop[ Select[ Range[415], Sort[f[ # - 1]] == Sort[f[ # + 1]] & ], 1]
Extensions
Edited and extended by Robert G. Wilson v, Aug 22 2002
Comments