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.

A356766 Least number k such that k and k+2 both have exactly 2n divisors, or -1 if no such number exists.

This page as a plain text file.
%I A356766 #29 Jul 01 2023 11:00:08
%S A356766 3,6,18,40,127251,198,26890623,918,17298,6640,25269208984375,3400,
%T A356766 3900566650390623,640062,8418573,18088,1164385682220458984373,41650,
%U A356766 69528379848480224609373,128464,34084859373,12164094,150509919493198394775390625,90270,418514293125,64505245696
%N A356766 Least number k such that k and k+2 both have exactly 2n divisors, or -1 if no such number exists.
%e A356766 For n=1, numdiv(3) = numdiv(5) = 2 = 2*1, and no number < 3 satisfies this, hence a(1) = 3.
%t A356766 a={}; n=1; nmax=10; For[k=1, n<=nmax, k++, If[DivisorSigma[0, k] == DivisorSigma[0, k+2] == 2n, AppendTo[a, k]; k=1; n++]]; a (* _Stefano Spezia_, Aug 26 2022 *)
%t A356766 Flatten[Table[SequencePosition[DivisorSigma[0,Range[27*10^6]],{2n,_,2n},1],{n,10}],1][[;;,1]] (* The program generates the first 10 terms of the sequence. To generate more, increase the Range constant but the program will take a long time to run. *) (* _Harvey P. Dale_, Jul 01 2023 *)
%o A356766 (PARI) a(n)=for(k=1,+oo,if(numdiv(k)==2*n&&numdiv(k+2)==2*n,return(k)))
%Y A356766 Numbers k such that k and k+2 both have exactly m divisors: A001359 (m=2), A356742 (m=4), A356743 (m=6), A356744 (m=8).
%Y A356766 Cf. A000005 (d(n)), A003680, A005238, A006558, A006601, A062832, A067888, A067889, A075036.
%K A356766 nonn
%O A356766 1,1
%A A356766 _Jean-Marc Rebert_, Aug 26 2022
%E A356766 More terms from _Jinyuan Wang_, Aug 28 2022