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.

Previous Showing 31-40 of 79 results. Next

A019444 a_1, a_2, ..., is a permutation of the positive integers such that the average of each initial segment is an integer, using the greedy algorithm to define a_n.

Original entry on oeis.org

1, 3, 2, 6, 8, 4, 11, 5, 14, 16, 7, 19, 21, 9, 24, 10, 27, 29, 12, 32, 13, 35, 37, 15, 40, 42, 17, 45, 18, 48, 50, 20, 53, 55, 22, 58, 23, 61, 63, 25, 66, 26, 69, 71, 28, 74, 76, 30, 79, 31, 82, 84, 33, 87, 34, 90, 92, 36, 95, 97, 38, 100, 39, 103, 105, 41, 108, 110, 43, 113
Offset: 1

Views

Author

R. K. Guy and Tom Halverson (halverson(AT)macalester.edu)

Keywords

Comments

Self-inverse when considered as a permutation or function, i.e., a(a(n)) = n. - Howard A. Landman, Sep 25 2001
That each initial segment has an integer average is trivially equivalent to the sum of the first n elements always being divisible by n. - Franklin T. Adams-Watters, Jul 07 2014
Also, a lexicographically minimal sequence of distinct positive integers such that all values of a(n)-n are also distinct. - Ivan Neretin, Apr 18 2015
Comments from N. J. A. Sloane, Mar 29 2025 (Start):
Let d(n) = number of 1 <= i <= n such that a(i) < i. The d(i) sequence begins 0, 0, 1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 6, ..., and appears to be A060144 without its initial term.
Let r(n) = 1 if a(n) < a(n+1), otherwise 0, and let f(n) = 1 if a(n) > a(n+1), otherwise 0. Then R = partial sums of r(n) and F = partial sums of f(n) count the rises and falls, respectively, in the present sequence. It appears that R and F are essentially A060143 and A060144 (again).
If a(n) is the k-th term in a monotonically strictly increasing rum of terms, set R(n) = k. It appears that the sequence R(n), n>=1, is essentially A270788.
For other sequences derived from the present one, see A382162, A382168, and A382169.
(End)

References

  • Muharem Avdispahić and Faruk Zejnulahi, An integer sequence with a divisibility property, Fibonacci Quarterly, Vol. 58:4 (2020), 321-333.

Crossrefs

Programs

  • Mathematica
    a[1]=1; a[n_] := a[n]=Module[{s, v}, s=a/@Range[n-1]; For[v=Mod[ -Plus@@s, n], v<1||MemberQ[s, v], v+=n, Null]; v]
    lst = {1}; f[s_List] := Block[{k = 1, len = 1 + Length@ lst, t = Plus @@ lst}, While[ MemberQ[s, k] || Mod[k + t, len] != 0, k++ ]; AppendTo[lst, k]]; Nest[f, lst, 69] (* Robert G. Wilson v, May 17 2010 *)
    Fold[Append[#1, #2 Ceiling[#2/GoldenRatio] - Total[#1]] &, {1}, Range[2, 70]] (* Birkas Gyorgy, May 25 2012 *)
  • PARI
    al(n)=local(v,s,fnd);v=vector(n);v[1]=s=1;for(k=2,n,fnd=0;for(i=1,k-1,if(v[i]==s,fnd=1;break));v[k]=if(fnd,s+k,s);s+=fnd);v \\ Franklin T. Adams-Watters, May 20 2010
    
  • PARI
    A019444_upto(N, c=0, A=Vec(1, N))={for(n=2, N, A[n]||(#AM. F. Hasler, Nov 27 2019

Formula

a(n) = A002251(n-1) + 1. (Corrected by M. F. Hasler, Sep 17 2014)
Let s(n) = (1/n)*Sum_{k=1..n} a(k) = A019446(n). Then if s(n-1) does not occur in a(1),...,a(n-1), a(n) = s(n) = s(n-1); otherwise, a(n) = s(n-1) + n and s(n) = s(n-1) + 1. - Franklin T. Adams-Watters, May 20 2010
Lim_{n->infinity} max(n,a(n))/min(n,a(n)) = phi = A001622. - Stanislav Sykora, Jun 12 2017

A007042 Left diagonal of partition triangle A047812.

Original entry on oeis.org

0, 1, 3, 5, 9, 13, 20, 28, 40, 54, 75, 99, 133, 174, 229, 295, 383, 488, 625, 790, 1000, 1253, 1573, 1956, 2434, 3008, 3716, 4563, 5602, 6840, 8347, 10141, 12308, 14881, 17975, 21635, 26013, 31183, 37336, 44581, 53172, 63259, 75173, 89132, 105556, 124752
Offset: 1

Views

Author

Keywords

Comments

For n > 2, a(n) is also the number of partitions of n into parts <= n-2: a(n) = A026820(n+1, n-1). - Reinhard Zumkeller, Jan 21 2010
Also, the number of partitions of 2*n in which n-1 is the maximal part; see the Mathematica section. - Clark Kimberling, Mar 13 2012
This is column 2 of the matrix A in Sect. 2.3 of the Govindarajan preprint, cf. references and A096651. - M. F. Hasler, Apr 12 2012

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Julia
    using Nemo
    function A007042List(len)
        R, z = PolynomialRing(ZZ, "z")
        e = eta_qexp(-1, len+2, z)
        [coeff(e, j) - 2 for j in 2:len+1] end
    A007042List(45) |> println # Peter Luschny, May 30 2020
  • Mathematica
    f[n_]:= Length[Select[IntegerPartitions[2 n], First[#]==n-1 &]]; Table[f[n], {n, 1, 24}] (* Clark Kimberling, Mar 13 2012 *)
    a[n_]:= PartitionsP[n+1]-2; Table[a[n], {n,1,50}] (* Jean-François Alcover, Jan 28 2015, after M. F. Hasler *)
  • PARI
    A007042(n)=numbpart(n+1)-2  \\ M. F. Hasler, Apr 12 2012
    

Formula

a(n) = A000041(n+1) - 2. - Vladeta Jovovic, Oct 06 2001

Extensions

More terms from James Sellers
Name edited by Petros Hadjicostas, May 31 2020

A019446 a(n) = ceiling(n/tau), where tau = (1+sqrt(5))/2.

Original entry on oeis.org

1, 2, 2, 3, 4, 4, 5, 5, 6, 7, 7, 8, 9, 9, 10, 10, 11, 12, 12, 13, 13, 14, 15, 15, 16, 17, 17, 18, 18, 19, 20, 20, 21, 22, 22, 23, 23, 24, 25, 25, 26, 26, 27, 28, 28, 29, 30, 30, 31, 31, 32, 33, 33, 34, 34, 35, 36, 36, 37, 38, 38, 39, 39, 40, 41, 41, 42, 43, 43, 44, 44, 45, 46, 46
Offset: 1

Views

Author

R. K. Guy, Tom Halverson (halverson(AT)macalester.edu)

Keywords

Comments

Average of first n terms of A019444, which is defined to be a permutation of the positive integers, p_1, p_2, ..., such that the average of each initial segment is an integer, using the greedy algorithm to define p_n.
Number of pairs (i,j) of nonnegative integers such that n-1=floor(i+j*tau). - Clark Kimberling, Jun 18 2002
The terms that occur exactly once are 1,3,6,8,..., given by A026352(n)=n+1+floor(n*tau). - Clark Kimberling, Jun 18 2002
The number n appears A001468(n) times. - Reinhard Zumkeller, Feb 02 2012
It seems that the indices of the terms that occur exactly once are listed in A276885. - Ivan N. Ianakiev, Aug 30 2018
From Michel Dekking, Oct 13 2020: (Start)
Here is a proof of the conjecture by Ivan N. Ianakiev. Let b = (b(n)) be the sequence of occurrences of the "singleton terms" in (a(n)). We have to show that b = A276885.
In the following phi := (1+sqrt(5))/2 (so phi = tau).
By its definition, the sequence (a(n)) is a generalized Beatty sequence with terms a(n) = floor(phi*n)-n+1, since 1/phi = phi-1. So by Lemma 8 in the paper by Allouche and Dekking, its sequence of first differences Delta = 1011010110..., given by Delta(n) = a(n+1)-a(n), is equal to y, where y = A005614 is the binary complement of the Fibonacci word. By definition, y is the fixed point of the morphism nu: 0->1, 1->10.
The crucial observation is that a term occurs exactly once in (a(n)) if and only if the word 11 of length 2 occurs in Delta (with an exception for a(1)=1). So to obtain the sequence b of occurrences of these "singleton terms", we have to study the return words of 11 in y. (The return words of 11 in y are the words occurring in y that start with 11, and having no other occurrences of 11.)
The return words of 11 are the words A:=11010, and B:=110. Since
nu(A) = nu(11010) = 10101101, nu(B) = nu(110) = 10101,
the morphism nu induces a descendant morphism tau given by
tau(A) = BA, tau(B) = A.
So tau is nothing else but the Fibonacci morphism on the alphabet {B,A}.
Since the words A and B have lengths 5 and 3, the first differences b(n+1)-b(n) are given by the fixed point z = 5353353533... of the Fibonacci morphism on the alphabet {5,3}.
From Lemma 8 in the paper by Allouche and Dekking we then obtain that the sequence b is a generalized Beatty sequence
V(n) = (5-3)*floor(phi*n)+(2*3-5)*n+r = 2*floor(phi*n)+n+r, for some integer r.
Starting at the value 4, filling in n=1, we obtain that r=1, and so V(n) = 2*floor(phi*n)+n+1. To incorporate also the first "singleton term" a(1)=1, we take
b(n) = V(n-1) = 2*floor(phi*(n-1))+n-1+1 = 2*floor(phi*(n-1))+n.
Then, indeed, b(n) = A276885(n), for n=1,2,... (see my Comment in A276885).
(End)
It seems that the indices of the records are listed in A026351. - Ivan N. Ianakiev, Mar 25 2021

Examples

			a(6)=4 since 6-1=[i+j*tau] for these (i,j): (5,0), (4,1), (2,2), (1,3). - _Clark Kimberling_, Jun 18 2002
		

Crossrefs

Programs

  • GAP
    a:=[1];; for n in [2..80] do a[n]:=n+1-a[a[n-1]]; od; a; # Muniru A Asiru, Aug 30 2018
    
  • Haskell
    a019446 n = a019446_list !! (n-1)
    a019446_list = 1 : zipWith (-) [3..] (map a019446 a019446_list)
    -- Reinhard Zumkeller, Feb 02 2012
    
  • Maple
    A019446:=n->ceil(2*n/(1+sqrt(5))); seq(A019446(n), 1..100); # Wesley Ivan Hurt, Jan 19 2014
  • Mathematica
    Ceiling[Range[80]/GoldenRatio] (* Harvey P. Dale, Aug 02 2011 *)
  • Python
    from math import isqrt
    def A019446(n): return (n+isqrt(5*n**2)>>1)-n+1 # Chai Wah Wu, Aug 09 2022

Formula

a(1)=1; a(n) = n+1 - a(a(n-1)). - Benoit Cloitre, Nov 06 2002
a(n) = A005206(n-1) + 1. - Reinhard Zumkeller, Feb 02 2012; corrected by Primoz Pirnat, Dec 28 2020
a(n) = A019445(n) / n. - Sean A. Irvine, Mar 17 2019

Extensions

Better name from David Radcliffe and John Rickard, Dec 12 2000
Edited by Dean Hickerson, Nov 09 2002

A007585 10-gonal (or decagonal) pyramidal numbers: a(n) = n*(n + 1)*(8*n - 5)/6.

Original entry on oeis.org

0, 1, 11, 38, 90, 175, 301, 476, 708, 1005, 1375, 1826, 2366, 3003, 3745, 4600, 5576, 6681, 7923, 9310, 10850, 12551, 14421, 16468, 18700, 21125, 23751, 26586, 29638, 32915, 36425, 40176, 44176, 48433, 52955, 57750
Offset: 0

Views

Author

Keywords

Comments

Binomial transform of [1, 10, 17, 8, 0, 0, 0, ...] = (1, 11, 38, 90, ...). - Gary W. Adamson, Mar 18 2009
This sequence is related to A000384 by a(n) = n*A000384(n) - Sum_{i=0..n-1} A000384(i) and this is the case d=4 in the identity n*(n*(d*n-d+2)/2) - Sum_{k=0..n-1} k*(d*k-d+2)/2 = n*(n+1)*(2*d*n - 2*d + 3)/6. - Bruno Berselli, Apr 21 2010
For n>0, (a(n)) is the principal diagonal of the convolution array A213750. - Clark Kimberling, Jun 20 2012
From Ant King, Oct 30 2012: (Start)
The partial sums of the figurate decagonal numbers A001107.
For n>1, the digital roots of this sequence A010888(A007585(n)) form the purely periodic 27-cycle {1,2,2,9,4,4,8,6,6,7,8,8,6,1,1,5,3,3,4,5,5,3,7,7,2,9,9}.
For n>1, the units’ digits of this sequence A010879(A007585(n)) form the purely periodic 20-cycle {1,1,8,0,5,1,6,8,5,5,6,6,3,5,0,6,1,3,0,0}.
(End)

References

  • A. H. Beiler, Recreations in the Theory of Numbers, Dover, NY, 1964, p. 194.
  • E. Deza and M. M. Deza, Figurate numbers, World Scientific Publishing (2012), page 93.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000384.
Cf. A093565 ((8, 1) Pascal, column m=3). Partial sums of A001107.
Cf. similar sequences listed in A237616.

Programs

Formula

a(n) = (8*n-5)*binomial(n+1, 2)/3.
G.f.: x*(1+7*x)/(1-x)^4.
a(n) = (8*n^3 + 3*n^2 - 5*n)/6. - Vincenzo Librandi, Aug 01 2010
a(0)=0, a(1)=1, a(2)=11, a(3)=38, a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). - Harvey P. Dale, Dec 20 2011
From Ant King, Oct 30 2012: (Start)
a(n) = a(n-1) + n*(4*n-3).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) + 8.
a(n) = (n+1)*(2*A001107(n) + n)/6.
a(n) = A000292(n) + 7*A000292(n-1).
a(n) = A007584(n) + A000292(n-1).
a(n) = A000217(n) + 8*A000292(n-1).
a(n) = binomial(n+2,3) + 7*binomial(n+1,3).
Sum_{n>=1} 1/a(n) = 6*(4*pi*(sqrt(2)-1) + 4*(8-sqrt(2))*log(2) + 8*sqrt(2)*log(2-sqrt(2))-5)/65 = 1.145932345...
(End)
a(n) = Sum_{i=0..n-1} (n-i)*(8*i+1), with a(0)=0. - Bruno Berselli, Feb 10 2014
E.g.f.: x*(6 + 27*x + 8*x^2)*exp(x)/6. - Ilya Gutkovskiy, May 12 2017

A061777 Start with a single triangle; at n-th generation add a triangle at each vertex, allowing triangles to overlap; sequence gives total population of triangles at n-th generation.

Original entry on oeis.org

1, 4, 10, 22, 40, 70, 112, 178, 268, 406, 592, 874, 1252, 1822, 2584, 3730, 5260, 7558, 10624, 15226, 21364, 30574, 42856, 61282, 85852, 122710, 171856, 245578, 343876, 491326, 687928, 982834, 1376044, 1965862, 2752288, 3931930, 5504788
Offset: 0

Views

Author

N. J. A. Sloane, R. K. Guy, Jun 23 2001

Keywords

Comments

From the definition, assign label value "1" to an origin triangle; at n-th generation add a triangle at each vertex. Each non-overlapping triangle will have the same label value as that of the predecessor triangle to which it is connected; for the overlapping ones, the label value will be the sum of the label values of predecessors. a(n) is the sum of all label values at the n-th generation. The triangle count is A005448. See illustration. For n >= 1, (a(n) - a(n-1))/3 is A027383. - Kival Ngaokrajang, Sep 05 2014

References

  • R. Reed, The Lemming Simulation Problem, Mathematics in School, 3 (#6, Nov. 1974), front cover and pp. 5-6.

Crossrefs

Partial sums of A061776.

Programs

  • Maple
    seq(`if`(n::even, 21*2^(n/2) - 6*n-20, 30*2^((n-1)/2)-6*n-20),n=0..100); # Robert Israel, Sep 14 2014
  • Mathematica
    Table[If[EvenQ[n],21 2^(n/2)-6n-20,30 2^((n-1)/2)-6(n-1)-26],{n,0,40}] (* Harvey P. Dale, Nov 06 2011 *)
  • PARI
    a(n)=if(n%2, 30, 21)<<(n\2) - 6*n - 20 \\ Charles R Greathouse IV, Sep 19 2014

Formula

From Colin Barker, May 08 2012: (Start)
a(n) = 21*2^(n/2) - 6*n - 20 if n is even.
a(n) = 30*2^((n-1)/2) - 6*(n - 1) - 26 if n is odd.
a(n) = 2*a(n-1) + a(n-2) - 4*a(n-3) + 2*a(n-4).
G.f.: (1 + 2*x)*(1 + x^2)/((1 - x)^2*(1 - 2*x^2)). (End)
From Robert Israel, Sep 14 2014: (Start)
a(n) = -20 - 6*n + (21 + 15*sqrt(2))*sqrt(2)^(n-2) + (21 - 15*sqrt(2))*(-sqrt(2))^(n-2).
a(n) = 2*a(n-2) + ((3*n-2)/(3*n-5))*(a(n-1)-2*a(n-3)). (End)
E.g.f.: 21*cosh(sqrt(2)*x) + 15*sqrt(2)*sinh(sqrt(2)*x) - 2*exp(x)*(10 + 3*x). - Stefano Spezia, Aug 13 2022

Extensions

Corrected by T. D. Noe, Nov 08 2006

A003504 a(0)=a(1)=1; thereafter a(n+1) = (1/n)*Sum_{k=0..n} a(k)^2 (a(n) is not always integral!).

Original entry on oeis.org

1, 1, 2, 3, 5, 10, 28, 154, 3520, 1551880, 267593772160, 7160642690122633501504, 4661345794146064133843098964919305264116096, 1810678717716933442325741630275004084414865420898591223522682022447438928019172629856
Offset: 0

Views

Author

Keywords

Comments

The sequence appears with a different offset in some other sources. - Michael Somos, Apr 02 2006
Also known as Göbel's (or Goebel's) Sequence. Asymptotically, a(n) ~ n*C^(2^n) where C=1.0478... (A115632). A more precise asymptotic formula is given in A116603. - M. F. Hasler, Dec 12 2007
Let s(n) = (n-1)*a(n). By considering the p-adic representation of s(n) for primes p=2,3,...,43, one finds that a(44) is the first nonintegral value in this sequence. Furthermore, for n>44, the valuation of s(n) w.r.t. 43 is -2^(n-44), implying that both s(n) and a(n) are nonintegral. - M. F. Hasler and Max Alekseyev, Mar 03 2009
a(44) is approximately 5.4093*10^178485291567. - Hans Havermann, Nov 14 2017.
The fractional part is simply 24/43 (see page 709 of Guy (1988)).
The more precise asymptotic formula is a(n+1) ~ C^(2^n) * (n + 2 - 1/n + 4/n^2 - 21/n^3 + 138/n^4 - 1091/n^5 + ...). - Michael Somos, Mar 17 2012

Examples

			a(3) = (1 * 2 + 2^2) / 2 = 3 given a(2) = 2.
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, 3rd edition, Sect. E15.
  • Clifford Pickover, A Passion for Mathematics, 2005.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A005166, A005167, A097398, A108394, A115632, A116603 (asymptotic formula).

Programs

  • Maple
    a:=2: L:=1,1,a: n:=15: for k to n-2 do a:=a*(a+k)/(k+1): L:=L,a od:L; # Robert FERREOL, Nov 07 2015
  • Mathematica
    a[n_] := a[n] = Sum[a[k]^2, {k, 0, n-1}]/(n-1); a[0] = a[1] = 1; Table[a[n], {n, 0, 13}] (* Jean-François Alcover, Feb 06 2013 *)
    With[{n = 14}, Nest[Append[#, (#.#)/(Length[#] - 1)] &, {1, 1}, n - 2]] (* Jan Mangaldan, Mar 21 2013 *)
  • PARI
    A003504(n,s=2)=if(n-->0,for(k=1,n-1,s+=(s/k)^2);s/n,1) \\ M. F. Hasler, Dec 12 2007
    
  • Python
    a=2; L=[1,1,a]; n=15
    for k in range(1,n-1):
        a=a*(a+k)//(k+1)
        L.append(a)
    print(L) # Robert FERREOL, Nov 07 2015

Formula

a(n+1) = ((n-1) * a(n) + a(n)^2) / n if n > 1. - Michael Somos, Apr 02 2006
0 = a(n)*(+a(n)*(a(n+1) - a(n+2)) - a(n+1) - a(n+1)^2) +a(n+1)*(a(n+1)^2 - a(n+2)) if n>1. - Michael Somos, Jul 25 2016

Extensions

a(0)..a(43) are integral, but from a(44) onwards every term is nonintegral - H. W. Lenstra, Jr.
Corrected and extended by M. F. Hasler, Dec 12 2007
Further corrections from Max Alekseyev, Mar 04 2009

A051278 Numbers n such that n = k/d(k) has a unique solution, where d(k) = number of divisors of k.

Original entry on oeis.org

4, 6, 9, 10, 12, 14, 15, 20, 21, 22, 26, 32, 33, 34, 35, 36, 38, 39, 42, 46, 50, 51, 55, 57, 58, 60, 62, 65, 66, 69, 70, 74, 75, 77, 78, 82, 85, 86, 87, 90, 91, 93, 94, 95, 96, 98, 100, 102, 106, 108, 110, 111, 114, 115, 118, 119, 122, 123, 126, 128, 129, 130
Offset: 1

Views

Author

Keywords

Comments

Because d(k) <= 2*sqrt(k), it suffices to check k from 1 to 4*n^2. - Nathaniel Johnston, May 04 2011
A051521(a(n)) = 1. - Reinhard Zumkeller, Dec 28 2011

Examples

			36 is the unique number k with k/d(k)=4.
		

Crossrefs

Programs

  • Haskell
    a051278 n = a051278_list !! (n-1)
    a051278_list = filter ((== 1) . a051521) [1..]
    -- Reinhard Zumkeller, Dec 28 2011
  • Maple
    with(numtheory): A051278 := proc(n) local ct,k: ct:=0: for k from 1 to 4*n^2 do if(n=k/tau(k))then ct:=ct+1: fi: od: if(ct=1)then return n: else return NULL: fi: end: seq(A051278(n),n=1..40);
  • Mathematica
    cnt[n_] := Count[Table[n == k/DivisorSigma[0, k], {k, 1, 4*n^2}], True]; Select[Range[130], cnt[#] == 1 &]  (* Jean-François Alcover, Oct 22 2012 *)

A051279 Numbers n such that n = k/d(k) has exactly 2 solutions, where d(k) = number of divisors of k.

Original entry on oeis.org

1, 2, 5, 7, 8, 11, 13, 16, 17, 19, 23, 24, 28, 29, 31, 37, 41, 43, 44, 47, 48, 52, 53, 56, 59, 61, 67, 68, 71, 73, 76, 79, 80, 81, 83, 84, 88, 89, 92, 97, 101, 103, 104, 107, 109, 113, 116, 120, 124, 127, 131, 132, 136, 137, 139, 148, 149, 151, 152, 154, 156
Offset: 1

Views

Author

Keywords

Comments

Because d(k) <= 2*sqrt(k), it suffices to check k from 1 to 4*n^2. - Nathaniel Johnston, May 04 2011
A051521(a(n)) = 2. - Reinhard Zumkeller, Dec 28 2011

Examples

			There are exactly 2 numbers k, 40 and 60, with k/d(k)=5.
		

Crossrefs

Programs

  • Haskell
    a051279 n = a051279_list !! (n-1)
    a051279_list = filter ((== 2) . a051521) [1..]
    -- Reinhard Zumkeller, Dec 28 2011
  • Maple
    with(numtheory): A051279 := proc(n) local ct, k: ct:=0: for k from 1 to 4*n^2 do if(n=k/tau(k))then ct:=ct+1: fi: od: if(ct=2)then return n: else return NULL: fi: end: seq(A051279(n), n=1..40); # Nathaniel Johnston, May 04 2011
  • Mathematica
    A051279 = Reap[Do[ct = 0; For[k = 1, k <= 4*n^2, k++, If[n == k/DivisorSigma[0, k], ct++]]; If[ct == 2, Print[n]; Sow[n]], {n, 1, 160}]][[2, 1]](* Jean-François Alcover, Apr 16 2012, after Nathaniel Johnston *)

A006231 a(n) = Sum_{k=2..n} n(n-1)...(n-k+1)/k.

Original entry on oeis.org

0, 1, 5, 20, 84, 409, 2365, 16064, 125664, 1112073, 10976173, 119481284, 1421542628, 18348340113, 255323504917, 3809950976992, 60683990530208, 1027542662934897, 18430998766219317, 349096664728623316, 6962409983976703316, 145841989688186383337
Offset: 1

Views

Author

Keywords

Comments

a(n) is also the number of permutations in the symmetric group S_n that are pure cycles, see example. - Avi Peretz (njk(AT)netvision.net.il), Mar 24 2001
Also the number of elementary circuits in a complete directed graph with n nodes [D. B. Johnson, 1975]. - N. J. A. Sloane, Mar 24 2014
If one takes 1,2,3,4, ..., n and starts creating parenthetic products of k-tuples and adding, one gets a(n+1). For 1,2,3,4 one gets (1)+(2)+(3)+(4) = 10; (1*2)+(2*3)+(3*4) = 20; (1*2*3)+(2*3*4) = 30; (1*2*3*4) = 24; and 10+20+30+24 = 84 = a(5). - J. M. Bergot, Apr 24 2014
Let P_n be the set of probability distributions over orderings of n objects that can be obtained by drawing n real numbers from independent probability distributions and sorting. Then a(n) is conjectured to be the dimension of P_n, as a semi-algebraic subset of R^(n!). - Jamie Tucker-Foltz, Jul 29 2024

Examples

			a(3) = 5 because the cycles in S_3 are (12), (13), (23), (123), (132).
a(4) = 20 because there are 24 permutations of {1,2,3,4} but we don't count (12)(34), (13)(24), (14)(23) or the identity permutation. - _Geoffrey Critzer_, Nov 03 2012
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Column k=1 of A136394.

Programs

  • Haskell
    a006231 n = numerator $
       sum $ tail $ zipWith (%) (scanl1 (*) [n,(n-1)..1]) [1..n]
    -- Reinhard Zumkeller, Dec 27 2011
    
  • Maple
    A006231 := proc(n)
        n*( hypergeom([1,1,1-n],[2],-1)-1) ;
        simplify(%) ;
    end proc: # R. J. Mathar, Aug 06 2013
  • Mathematica
    a[n_] = n*(HypergeometricPFQ[{1,1,1-n}, {2}, -1] - 1); Table[a[n], {n, 1, 20}] (* Jean-François Alcover,  Mar 29 2011 *)
    Table[Sum[Times@@Range[n-k+1,n]/k,{k,2,n}],{n,20}] (* Harvey P. Dale, Sep 23 2011 *)
  • PARI
    a(n) = n--; sum(ip=1, n, sum(j=1, n-ip+1, prod(k=j, j+ip-1, k))); \\ Michel Marcus, May 07 2014 after comment by J. M. Bergot

Formula

a(n+1) - a(n) = A000522(n) - 1.
a(n) = n*( 3F1(1,1,1-n; 2;-1) -1). - Jean-François Alcover, Mar 29 2011
E.g.f.: exp(x)*(log(1/(1-x))-x). - Geoffrey Critzer, Sep 12 2012
G.f.: (Q(0) - 1)/(1-x)^2, where Q(k)= 1 + (2*k + 1)*x/( 1 - x - 2*x*(1-x)*(k+1)/(2*x*(k+1) + (1-x)/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 09 2013
Conjecture: a(n) + (-n-2)*a(n-1) + (3*n-2)*a(n-2) + 3*(-n+2)*a(n-3) + (n-3)*a(n-4) = 0. - R. J. Mathar, Aug 06 2013

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Mar 27 2001

A039957 Squarefree numbers congruent to 3 mod 4.

Original entry on oeis.org

3, 7, 11, 15, 19, 23, 31, 35, 39, 43, 47, 51, 55, 59, 67, 71, 79, 83, 87, 91, 95, 103, 107, 111, 115, 119, 123, 127, 131, 139, 143, 151, 155, 159, 163, 167, 179, 183, 187, 191, 195, 199, 203, 211, 215, 219, 223, 227, 231, 235, 239, 247, 251, 255
Offset: 1

Views

Author

Keywords

Comments

Negatives of odd fundamental discriminants D := b^2-4*a*c<0 of definite integer binary quadratic forms F=a*x^2+b*x*y+c*y^2. See Buell reference pp. 224-230. See 4*A089269 = A191483 for the even case and A003657 for combined even and odd numbers. - Wolfdieter Lang, Nov 07 2003
The asymptotic density of this sequence is 2/Pi^2 = 0.202642... (A185197). - Amiram Eldar, Feb 10 2021

References

  • Richard A. Mollin, Quadratics, CRC Press, 1996, Tables B1-B3.
  • Duncan A. Buell, Binary Quadratic Forms, Springer-Verlag, NY, 1989.

Crossrefs

Programs

  • Haskell
    a039957 n = a039957_list !! (n-1)
    a039957_list = filter ((== 3) . (`mod` 4)) a005117_list
    -- Reinhard Zumkeller, Aug 15 2011
    
  • Magma
    [4*n+3: n in [0..63] | IsSquarefree(4*n+3)];  // Bruno Berselli, Mar 04 2011
    
  • Mathematica
    fQ[n_] := SquareFreeQ[n] && Mod[n, 4] == 3; Select[ Range@ 258, fQ] (* Robert G. Wilson v, Mar 02 2011 *)
    Select[Range[3,300,4],SquareFreeQ] (* Harvey P. Dale, Mar 08 2015 *)
  • PARI
    is(n)=n%4==3 && issquarefree(n) \\ Charles R Greathouse IV, Feb 07 2017

Extensions

Offset corrected
Previous Showing 31-40 of 79 results. Next