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.

A122781 Nonprimes n such that 4^n==4 (mod n).

This page as a plain text file.
%I A122781 #16 Apr 24 2018 18:02:10
%S A122781 1,4,6,12,15,28,66,85,91,186,276,341,435,451,532,561,645,703,946,1068,
%T A122781 1105,1247,1271,1387,1581,1695,1729,1891,1905,2044,2046,2047,2071,
%U A122781 2465,2701,2821,2926,3133,3277,3367,3683,4033,4369,4371,4681,4795
%N A122781 Nonprimes n such that 4^n==4 (mod n).
%C A122781 If both numbers q and 2q-1 are prime, then q*(2q-1) is in the sequence. So, A005382(n)*(2*A005382(n)-1) = A129521(n) form a subsequence.
%H A122781 Vincenzo Librandi, <a href="/A122781/b122781.txt">Table of n, a(n) for n = 1..500</a>
%p A122781 for n from 1 to 5000 do if 4^n mod n = 4 mod n and not isprime(n) then print(n) fi od; # _Gary Detlefs_, May 14 2012
%t A122781 Select[Range[4800], ! PrimeQ[ # ] && Mod[4^#, # ] == Mod[4, # ] &]
%t A122781 Join[{1,4},Select[Range[5000],!PrimeQ[#]&&PowerMod[4,#,#]==4&]] (* _Harvey P. Dale_, Apr 09 2018 *)
%Y A122781 Contains A020136, A001567, A006935 (except n=2), and A129521 as subsequences.
%Y A122781 Cf. A005382.
%K A122781 easy,nonn
%O A122781 1,2
%A A122781 _Farideh Firoozbakht_, Sep 12 2006