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.

A386856 Least k such that A056100(k) = 2*n+1 or -1 if no such k exists.

This page as a plain text file.
%I A386856 #18 Aug 05 2025 21:38:01
%S A386856 6,4,8,9,16,26,15,34,20,27,25,115,56,58,62,57,35,74,90,82,86,49,94,
%T A386856 329,60,106,517582,78,91,122,110,77,128,111,142,146,88,427,158,102,
%U A386856 100,265,273,178,242,95,212,194,104,202,125,462,214,218,132,121,344,138,470,241582
%N A386856 Least k such that A056100(k) = 2*n+1 or -1 if no such k exists.
%C A386856 a(n) is the least k such that (sigma(k)*phi(k) + 1) mod k = 2*n+1 or -1 if no such k exists.
%H A386856 Michel Marcus, <a href="/A386856/b386856.txt">Table of n, a(n) for n = 0..465</a>
%t A386856 a[n_]:=Module[{k=1},While[Mod[DivisorSigma[1,k]EulerPhi[k]+1,k]!=2n+1, k++]; k]; Array[a,60,0] (* _Stefano Spezia_, Aug 05 2025 *)
%o A386856 (PARI) f(n) = (sigma(n)*eulerphi(n)+1) % n; \\ A056100
%o A386856 a(n) = my(k=1); while (f(k) != 2*n+1, k++); k;
%Y A386856 Cf. A056100.
%K A386856 nonn
%O A386856 0,1
%A A386856 _Michel Marcus_, Aug 05 2025