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.

User: Daniele Parisse

Daniele Parisse's wiki page.

Daniele Parisse has authored 3 sequences.

A083277 k appears 3k-2 times.

Original entry on oeis.org

1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8
Offset: 1

Author

Daniele Parisse, Jun 02 2003, Jul 07 2007

Keywords

Crossrefs

Cf. A016777 (3n-2 with offset 1).
Partial sums of A255849.

Programs

Formula

a(n) = ceiling((1+sqrt(24*n+1))/6) = floor((7+sqrt(24*n-23))/6).

A035531 a(n) = A000120(n) + A001221(n) - 1.

Original entry on oeis.org

0, 1, 2, 1, 2, 3, 3, 1, 2, 3, 3, 3, 3, 4, 5, 1, 2, 3, 3, 3, 4, 4, 4, 3, 3, 4, 4, 4, 4, 6, 5, 1, 3, 3, 4, 3, 3, 4, 5, 3, 3, 5, 4, 4, 5, 5, 5, 3, 3, 4, 5, 4, 4, 5, 6, 4, 5, 5, 5, 6, 5, 6, 7, 1, 3, 4, 3, 3, 4, 5, 4, 3, 3, 4, 5, 4, 5, 6, 5, 3, 3, 4, 4, 5, 5, 5, 6, 4, 4, 6, 6, 5, 6, 6, 7, 3, 3, 4, 5, 4, 4, 6, 5, 4, 6, 5, 5, 5, 5, 7, 7
Offset: 1

Keywords

Crossrefs

Cf. also A336149.

Programs

  • Maple
    A035531 := proc(n)
        A000120(n)+A001221(n)-1 ;
    end proc:
    seq(A035531(n),n=1..100) ; # R. J. Mathar, Mar 12 2018
  • Mathematica
    Table[DigitCount[n, 2, 1] + PrimeNu[n] - 1, {n, 1, 100}] (* G. C. Greubel, Apr 24 2017 *)
  • PARI
    a(n) = hammingweight(n) + omega(n) - 1; \\ Michel Marcus, Apr 25 2017
    
  • Python
    from sympy import primefactors
    def a(n): return 0 if n<2 else bin(n)[2:].count("1") + len(primefactors(n)) - 1 # Indranil Ghosh, Apr 25 2017

Formula

G.f.: Sum a(n) x^n = Sum A000120(p)*x^p/(1-x^p), p = prime.

Extensions

More terms from David W. Wilson.

A035532 a(n) = 2*phi(n) if n composite, or 2*phi(n) - (A000120(n)-1) if n prime, where phi = A000010, Euler's totient function, and a(1) = 1.

Original entry on oeis.org

1, 2, 3, 4, 7, 4, 10, 8, 12, 8, 18, 8, 22, 12, 16, 16, 31, 12, 34, 16, 24, 20, 41, 16, 40, 24, 36, 24, 53, 16, 56, 32, 40, 32, 48, 24, 70, 36, 48, 32, 78, 24, 81, 40, 48, 44, 88, 32, 84, 40, 64, 48, 101, 36, 80, 48, 72, 56, 112, 32, 116, 60, 72, 64, 96, 40, 130, 64, 88, 48, 137
Offset: 1

Keywords

Programs

  • Haskell
    a035532 1 = 1
    a035532 n = if a010051' n == 0 then phi2 else phi2 - a000120 n + 1
                where phi2 = 2 * a000010 n
    -- Reinhard Zumkeller, Feb 04 2015
    
  • Mathematica
    Insert[Table[If[PrimeQ[n],2*EulerPhi[n] - DigitCount[n, 2][[1]] + 1, 2*EulerPhi[n]], {n, 2, 100}], 1, 1] (* Stefan Steinerberger, Apr 11 2006 *)
  • PARI
    A035532(n)=2*eulerphi(n)-if(isprime(n),hammingweight(n)-1,n==1) \\ M. F. Hasler, Mar 10 2018

Formula

a(n) = 2*A000010(n) - A010051(n)*A048881(n-1), for n > 1. - Reinhard Zumkeller, Feb 04 2015, edited by M. F. Hasler, Mar 10 2018
For many values of n, the inverse Möbius transform of this sequence (g.f.: Sum a(n)*x^n/(1-x^n)) equals A005187, but this is not the case for composite n such that A297115(n) <> 0. The equality does hold for A297111 instead. - Antti Karttunen & M. F. Hasler, Mar 10 2018

Extensions

More terms from James Sellers
Definition amended for a(1) = 1 by M. F. Hasler, Mar 10 2018