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.

Showing 1-2 of 2 results.

A182938 If n = Product (p_j^e_j) then a(n) = Product (binomial(p_j, e_j)).

Original entry on oeis.org

1, 2, 3, 1, 5, 6, 7, 0, 3, 10, 11, 3, 13, 14, 15, 0, 17, 6, 19, 5, 21, 22, 23, 0, 10, 26, 1, 7, 29, 30, 31, 0, 33, 34, 35, 3, 37, 38, 39, 0, 41, 42, 43, 11, 15, 46, 47, 0, 21, 20, 51, 13, 53, 2, 55, 0, 57, 58, 59, 15, 61, 62, 21, 0, 65, 66
Offset: 1

Views

Author

Peter Luschny, Jan 16 2011

Keywords

Crossrefs

Programs

  • Haskell
    a182938 n = product $ zipWith a007318'
       (a027748_row n) (map toInteger $ a124010_row n)
    -- Reinhard Zumkeller, Feb 18 2012
  • Maple
    A182938 := proc(n) local e,j; e := ifactors(n)[2]:
    mul (binomial(e[j][1], e[j][2]), j=1..nops(e)) end:
    seq (A182938(n), n=1..100);
  • Mathematica
    a[n_] := Times @@ (Map[Binomial @@ # &, FactorInteger[n], 1]);
    Table[a[n], {n, 1, 100}] (* Kellen Myers, Jan 16 2011 *)
  • PARI
    a(n)=prod(i=1,#n=factor(n)~,binomial(n[1,i],n[2,i])) \\ M. F. Hasler
    
  • PARI
    for(n=1, 100, print1(direuler(p=2, n, (1 + X)^p)[n], ", ")) \\ Vaclav Kotesovec, Mar 28 2025
    

Formula

a(A185359(n)) = 0. - Reinhard Zumkeller, Feb 18 2012
Dirichlet g.f.: Product_{p prime} (1 + p^(-s))^p. - Ilya Gutkovskiy, Oct 26 2019
Conjecture: Sum_{k=1..n} a(k) ~ c * n^2, where c = 0.33754... - Vaclav Kotesovec, Mar 28 2025

Extensions

Given terms checked with new PARI code by M. F. Hasler, Jan 16 2011

A340901 Additive with a(p^e) = (-p)^e.

Original entry on oeis.org

0, -2, -3, 4, -5, -5, -7, -8, 9, -7, -11, 1, -13, -9, -8, 16, -17, 7, -19, -1, -10, -13, -23, -11, 25, -15, -27, -3, -29, -10, -31, -32, -14, -19, -12, 13, -37, -21, -16, -13, -41, -12, -43, -7, 4, -25, -47, 13, 49, 23, -20, -9, -53, -29, -16, -15, -22, -31
Offset: 1

Views

Author

Sebastian Karlsson, Jan 26 2021

Keywords

Comments

The sequence contains every integer infinitely many times.
Proof (outline):
1. Every integer m > 9 is the sum of distinct odd primes [R. E. Dressler].
2. Any integer k (positive as negative) can be written as k = 4^e - m, for sufficiently large and infinitely many e > 0 and m > 9.
3. Pick an arbitrary integer k and write it like k = 4^e - m. Let p_1, p_2, ..., p_i be distinct odd primes such that p_1 + p_2 + ... + p_i = m. Then a(p_1*p_2*...*p_i*4^e) = 4^e - m = k. Since there are infinitely many representations of any k of the form 4^e - m, this means that there are infinitely many n such that a(n) = k.
Q.E.D.

Examples

			a(20) = a(2^2*5) = (-2)^2 + (-5) = -1.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Total@ (((-First[#])^Last[#]) & /@ FactorInteger[n]); a[1] = 0; Array[a, 100] (* Amiram Eldar, May 15 2023 *)
  • PARI
    a(n) = my(f=factor(n)); sum(k=1, #f~, (-f[k,1])^f[k,2]); \\ Michel Marcus, Jan 26 2021
    (APL, Dyalog dialect) A340901 ← {1=⍵:0 ⋄ +/{(-⍺)*≢⍵}⌸factors(⍵)} ⍝ Needs also factors function from https://dfns.dyalog.com/c_factors.htm - Antti Karttunen, Feb 16 2024
  • Python
    from sympy import primefactors as pf, multiplicity as mult
    def a(n):
        return sum([(-p)**mult(p, n) for p in pf(n)])
    for n in range(1, 59):
        print(a(n), end=', ')
    

Formula

a(A002035(n)) = - A008475(A002035(n)).
a(n^2) = A008475(n^2).
Showing 1-2 of 2 results.