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 A074997 #13 Jan 02 2020 04:15:13 %S A074997 4,6,12,18,19,30,34,42,51,55,56,60,72,86,92,94,102,108,138,142,144, %T A074997 150,160,180,184,186,192,198,202,204,214,216,218,220,228,236,240,243, %U A074997 248,249,266,270,282,300,302,304,307,312,320,322,328,340,341,348,349,392 %N A074997 Numbers which are sandwiched between two numbers having the same unordered canonical form. %C A074997 The average of twin primes is a member. %H A074997 Amiram Eldar, <a href="/A074997/b074997.txt">Table of n, a(n) for n = 1..10000</a> %e A074997 19 is sandwiched between 18 and 20 which are of the form p^2*q where p and q are primes. %p A074997 k := 0: for j from 2 to 5000 do a := ifactors(j-1): b := ifactors(j+1): if sort([seq(a[2][i][2],i= 1..nops(a[2]))])= sort([seq(b[2][i][2],i= 1..nops(b[2]))]) then k := k+1: c[k] := j: fi: od: seq(c[i],i= 1..k); %t A074997 f[n_] := Flatten[Table[{ # [[2]]}] & /@ FactorInteger[n]]; Drop[ Select[ Range[415], Sort[f[ # - 1]] == Sort[f[ # + 1]] & ], 1] %o A074997 (PARI) isok(n) = vecsort(factor(n-1)[,2]) == vecsort(factor(n+1)[,2]); \\ _Michel Marcus_, Jul 28 2015 %Y A074997 Cf. A074998, A061715, A074460. %K A074997 nonn %O A074997 1,1 %A A074997 _Amarnath Murthy_, Aug 21 2002 %E A074997 More terms from _Sascha Kurz_ and _Robert G. Wilson v_, Aug 22 2002 %E A074997 Offset set to 1 by _Michel Marcus_, Jul 28 2015