login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A005238 Numbers n such that n, n+1 and n+2 have the same number of divisors.
(Formerly M5236)
25

%I M5236

%S 33,85,93,141,201,213,217,230,242,243,301,374,393,445,603,633,663,697,

%T 902,921,1041,1105,1137,1261,1274,1309,1334,1345,1401,1641,1761,1832,

%U 1837,1885,1893,1924,1941,1981,2013,2054,2101,2133,2181,2217,2264,2305

%N Numbers n such that n, n+1 and n+2 have the same number of divisors.

%D M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 840.

%D J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 33, pp 12, Ellipses, Paris 2008.

%D R. K. Guy, Unsolved Problems in Number Theory, B18.

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H Amiram Eldar, <a href="/A005238/b005238.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from T. D. Noe)

%H M. Abramowitz and I. A. Stegun, eds., <a href="http://www.convertit.com/Go/ConvertIt/Reference/AMS55.ASP">Handbook of Mathematical Functions</a>, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].

%p with(numtheory); A005238:=proc(q) local n;

%p for n from 1 to q do

%p if tau(n)=tau(n+1) and tau(n+1)=tau(n+2) then print(n); fi;

%p od; end: A005238(10^4); # _Paolo P. Lava_, May 03 2013

%t f[n_]:=Length[Divisors[n]]; lst={};Do[If[f[n]==f[n+1]==f[n+2],AppendTo[lst,n]],{n,8!}];lst (* _Vladimir Joseph Stephan Orlovsky_, Dec 14 2009 *)

%t Select[Range[2500],DivisorSigma[0,#]==DivisorSigma[0,#+1] == DivisorSigma[ 0,#+2]&] (* _Harvey P. Dale_, Nov 12 2012 *)

%t Flatten[Position[Partition[DivisorSigma[0,Range[2500]],3,1],{x_,x_,x_}]] (* _Harvey P. Dale_, Jul 06 2015 *)

%t SequencePosition[DivisorSigma[0,Range[2500]],{x_,x_,x_}][[All,1]] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Jul 03 2017 *)

%o (Haskell)

%o import Data.List (elemIndices)

%o a005238 n = a005238_list !! (n-1)

%o a005238_list = map (+ 1) $ elemIndices 0 $ zipWith (+) ds $ tail ds where

%o ds = map abs $ zipWith (-) (tail a000005_list) a000005_list

%o -- _Reinhard Zumkeller_, Oct 03 2012

%o (PARI) is(n)=my(d=numdiv(n)); numdiv(n+1)==d && numdiv(n+2)==d \\ _Charles R Greathouse IV_, Feb 06 2017

%Y Cf. A000005, A005237, A006601, A049051, A006558, A019273, A039665, A051950.

%K nonn,easy,nice

%O 1,1

%A _N. J. A. Sloane_

%E More terms from _Olivier GĂ©rard_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 3 09:46 EST 2021. Contains 341760 sequences. (Running on oeis4.)