cp's OEIS Frontend

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.

A153513 Composite numbers k such that 2^k-2 and 3^k-3 are both divisible by k and k is not a Carmichael number (A002997).

This page as a plain text file.
%I A153513 #29 Jun 13 2021 08:46:22
%S A153513 2701,18721,31621,49141,83333,83665,88561,90751,93961,104653,107185,
%T A153513 176149,204001,226801,228241,276013,282133,534061,563473,574561,
%U A153513 622909,653333,665281
%N A153513 Composite numbers k such that 2^k-2 and 3^k-3 are both divisible by k and k is not a Carmichael number (A002997).
%H A153513 Amiram Eldar, <a href="/A153513/b153513.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..200 from Robert Israel)
%p A153513 filter:= proc(n) local p;
%p A153513   if isprime(n) or (2 &^n - 2 mod n <> 0) or (3 &^n - 3 mod n <> 0) then return false fi;
%p A153513   if n::even then return true fi;
%p A153513   if not numtheory:-issqrfree(n) then return true fi;
%p A153513   for p in numtheory:-factorset(n) do
%p A153513     if n-1 mod (p-1) <> 0 then return true fi
%p A153513   od;
%p A153513 false
%p A153513 end proc:
%p A153513 select(filter, [$2..10^6]); # _Robert Israel_, Jan 29 2017
%t A153513 Reap[Do[If[CompositeQ[n] && Divisible[2^n-2, n] && Divisible[3^n-3, n] && Mod[n, CarmichaelLambda[n]] != 1, Print[n]; Sow[n]], {n, 2, 10^6}]][[2, 1]] (* _Jean-François Alcover_, Mar 25 2019 *)
%Y A153513 Intersection of A153514 and A153508 (excluding the number 1).
%Y A153513 Cf. A002997, A122780.
%K A153513 nonn
%O A153513 1,1
%A A153513 _Artur Jasinski_, Dec 28 2008