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.

A001099 a(n) = n^n - a(n-1), with a(1) = 1.

This page as a plain text file.
%I A001099 #22 Jun 17 2022 16:34:25
%S A001099 1,3,24,232,2893,43763,779780,15997436,371423053,9628576947,
%T A001099 275683093664,8640417354592,294234689237661,10817772136320355,
%U A001099 427076118244539020,18019667955465012596,809220593930871751581,38537187481365665823843,1939882468178947923300136
%N A001099 a(n) = n^n - a(n-1), with a(1) = 1.
%H A001099 T. D. Noe, <a href="/A001099/b001099.txt">Table of n, a(n) for n = 1..100</a>
%F A001099 Absolute value of Sum_{k=1..n} k^k*(-1)^(k+1). a(n) = n^n - (n-1)^(n-1) + (n-2)^(n-2) - ... - (-1)^n*1^1. - _Alexander Adamchuk_, Jun 30 2006
%t A001099 Abs[Table[Sum[k^k*(-1)^(k+1),{k,1,n}],{n,1,30}]] (* _Alexander Adamchuk_, Jun 30 2006 *)
%t A001099 RecurrenceTable[{a[1]==1,a[n]==n^n-a[n-1]},a,{n,20}] (* _Harvey P. Dale_, Jan 21 2015 *)
%o A001099 (Python)
%o A001099 from itertools import accumulate, count, islice
%o A001099 def A001099_gen(): # generator of terms
%o A001099     yield from accumulate((k**k for k in count(1)),func=lambda x,y:y-x)
%o A001099 A001099_list = list(islice(A001099_gen(),20)) # _Chai Wah Wu_, Jun 17 2022
%Y A001099 Cf. A001923.
%K A001099 nonn
%O A001099 1,2
%A A001099 _Ed Smiley_