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.

A053249 Number of divisors of n such that n and n+1 have the same sum of divisors.

Original entry on oeis.org

4, 4, 8, 8, 12, 8, 8, 4, 6, 12, 10, 4, 16, 12, 8, 8, 8, 12, 16, 8, 8, 16, 16, 16, 16, 8, 16, 8, 16, 4, 16, 16, 16, 12, 24, 12, 16, 8, 16, 16, 8, 16, 16, 12, 16, 16, 16, 16, 12, 12, 12, 16, 16, 40, 16, 16, 32, 12, 24, 32, 24, 16, 16, 24, 24, 4, 24, 16, 64, 24, 16, 8, 16, 16, 16, 24, 32, 32, 20, 16
Offset: 1

Views

Author

Asher Auel, Jan 11 2000

Keywords

Crossrefs

Programs

  • Magma
    [#Divisors(n):n in [1..4000000]| SumOfDivisors(n) eq SumOfDivisors(n+1)]; // Marius A. Burtea, Sep 07 2019
  • Mathematica
    Reap[ Do[ If[ DivisorSigma[1, n] == DivisorSigma[1, n + 1], tau = DivisorSigma[0, n]; Print[{n, tau}]; Sow[tau]], {n, 1, 4*10^6}]][[2, 1]] (* Jean-François Alcover, Oct 08 2012 *)
    DivisorSigma[0,#]&/@Flatten[Position[Partition[DivisorSigma[1,Range[ 4000000]],2,1], ?(First[#] == Last[#]&),{1},Heads->False]] (* _Harvey P. Dale, Jul 04 2014 *)
    DivisorSigma[0,#]&/@(SequencePosition[DivisorSigma[1,Range[4000000]],{x_,x_}][[All,1]]) (* Requires Mathematica version 10 or later *)  (* Harvey P. Dale, Jul 25 2019 *)
  • PARI
    do(lim)=my(v=List(),k=1,t); for(n=2,lim, t=sigma(n); if(t==k, listput(v, numdiv(n-1))); k=t); Vec(v) \\ Charles R Greathouse IV, Feb 08 2017
    

Formula

a(n) = tau(A002961(n)).

Extensions

More terms from Naohiro Nomoto, Mar 16 2001