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.

A276080 a(n) = A276075(A206296(n)).

Original entry on oeis.org

0, 1, 2, 7, 28, 139, 822, 5677, 44888, 400021, 3966970, 43328131, 516782292, 6682867087, 93130824878, 1391321096089, 22181459914672, 375880800693097, 6746469047955378, 127851581333528191, 2551039715319388940, 53457519928692619411, 1173770856436282074982, 26948387795024752862917, 645694707721735535710728, 16117771962578155161812989
Offset: 0

Views

Author

Antti Karttunen, Aug 18 2016

Keywords

Crossrefs

Programs

  • Maple
    A276080 := proc (n) add((n-2*k)*factorial(n-k-1)/factorial(k), k = 0..floor((1/2)*n-1/2)) end proc:
    seq(A276080(n), n = 0..25); # Peter Bala, Dec 24 2017
  • Mathematica
    Map[If[# == 1, 0, Total[FactorInteger[#] /. {p_, e_} /; p > 1 :> e PrimePi[p]!]] &, Nest[Append[#, (Times @@ Map[#1^#2 & @@ # &, FactorInteger[#] /. {p_, e_} /; e > 0 :> {Prime[PrimePi@ p + 1], e}] - Boole[# == 1] &@ #[[-1]]) #[[-2]]] &, {1, 2}, 24]] (* Michael De Vlieger, Dec 24 2017 *)
  • Python
    from sympy import factorint, factorial as f, prime, primepi
    from operator import mul
    from functools import reduce
    def a003961(n):
        F=factorint(n)
        return 1 if n==1 else reduce(mul, [prime(primepi(i) + 1)**F[i] for i in F])
    def a276075(n):
        F=factorint(n)
        return 0 if n==1 else sum([F[i]*f(primepi(i)) for i in F])
    l=[1, 2]
    L=[0, 1]
    for n in range(2, 11):
        l.append(a003961(l[n - 1])*l[n - 2])
        L.append(a276075(l[n]))
    print(L) # Indranil Ghosh, Jun 21 2017
  • Scheme
    (define (A276080 n) (A276075 (A206296 n)))
    ;; A more practical standalone program, that uses memoization-macro definec:
    (define (A276080 n) (sum_factorials_times_elements_in (A206296as_index_lists n)))
    (definec (A206296as_index_lists n) (cond ((zero? n) (list)) ((= 1 n) (list 1)) (else (map + (cons 0 (A206296as_index_lists (- n 1))) (append (A206296as_index_lists (- n 2)) (list 0 0))))))
    (define (sum_factorials_times_elements_in nums) (let loop ((s 0) (nums nums) (i 2) (f 1)) (cond ((null? nums) s) (else (loop (+ s (* (car nums) f)) (cdr nums) (+ 1 i) (* i f))))))
    

Formula

a(n) = A276075(A206296(n)).
From Peter Bala, Dec 24 2017: (Start)
a(n) = Sum_{k = 0..floor((n-1)/2)} (n-2*k)!*binomial(n-k-1,k).
O.g.f.: Sum_{n >= 1} n!*x^n/(1 - x^2)^n = x + 2*x^2 + 7*x^3 + 28*x^4 + ....
Cf. A001339(n) = A276075(A007188(n)) for n >= 1, with o.g.f. Sum_{n >= 0} n!*x^n/(1 - x)^n. (End)