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 A066341 #14 Apr 11 2025 17:53:09 %S A066341 1,1,1,1,8,1,1,1,12,1,14,1,16,17,1,1,20,1,22,23,24,1,26,1,28,1,30,1, %T A066341 94,1,1,35,36,37,38,1,40,41,42,1,130,1,46,47,48,1,50,1,52,53,54,1,56, %U A066341 57,58,59,60,1,184,1,64,65,1,67,202,1,70,71,214,1,74,1,76,77,78,79,238,1 %N A066341 Sum of distinct terms in n-th row of Fermat's triangle. %H A066341 Antti Karttunen, <a href="/A066341/b066341.txt">Table of n, a(n) for n = 2..13737</a> (terms 2..2000 from Muniru A Asiru) %F A066341 Conjectures from _Ridouane Oudra_, Apr 05 2025: (Start) %F A066341 a(n) = (n+1)*2^(omega(n)-1) - n, where omega(n) = A001221(n). %F A066341 a(n) = (n+1)*A007875(n) - n. %F A066341 a(n) = (n/2)*A087893(n) + A007875(n). (End) %e A066341 Fermat's triangle (A066340) is {1}, {1, 1}, {1, 0, 1}, {1, 1, 1, 1}, {1, 4, 3, 4, 1}, ... and the distinct terms in each row are {1}, {1}, {0, 1}, {1}, {1, 3, 4}, ... with sums 1, 1, 1, 1, 8, ... %t A066341 Plus@@@(Union/@Table[ (PowerMod[ #, EulerPhi[ k ], k ])&/@ Range[ k-1 ], {k, 2, 256} ]) or equivalently Table[ w=Length[ FactorInteger[ k ]];(2^(w-1)-1)*k+2^(w-1), {k, 2, 256} ] %o A066341 (PARI) A066341(n) = { my(ph = eulerphi(n),m=Map(),t,s=0); for(k=1,n-1,t = ((k^ph)%n); if(!mapisdefined(m, t), s += t; mapput(m,t,t))); (s); }; \\ _Antti Karttunen_, Aug 06 2018 %o A066341 (GAP) List(List(List([2..80],n->List([1..n-1],m->PowerMod(m,Phi(n),n))),Set),Sum); # _Muniru A Asiru_, Aug 06 2018 %Y A066341 Cf. A066340, A001221, A007875, A087893. %K A066341 easy,nonn %O A066341 2,5 %A A066341 _Wouter Meeussen_, Jan 01 2002