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 58 results. Next

A062870 Number of permutations of degree n with greatest sum of distances.

Original entry on oeis.org

1, 1, 1, 3, 4, 20, 36, 252, 576, 5184, 14400, 158400, 518400, 6739200, 25401600, 381024000, 1625702400, 27636940800, 131681894400, 2501955993600, 13168189440000, 276531978240000, 1593350922240000, 36647071211520000, 229442532802560000, 5736063320064000000
Offset: 0

Views

Author

Olivier Gérard, Jun 26 2001

Keywords

Comments

Number of possible values is 1,2,3,5,7,10,13,17,21,... which I conjecture to be A033638. Maximum distance divided by 2 is the same minus one, i.e., 0,1,2,4,6,9,12,16,20,... which seems to be A002620.

Examples

			(4,3,1,2) has distances (3,1,2,2), sum is 8 and there are 3 other permutations of degree 4 {3, 4, 1, 2}, {3, 4, 2, 1}, {4, 3, 2, 1} with this sum which is the maximum possible.
		

Crossrefs

A007590(n) is the greatest sum of distances for a permutation of degree n. - Dmitry Kamenetsky, Nov 14 2017

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<2, 1+n*(n-1),
          (n*((n-1)^2*(3*n-4)*a(n-2)-4*a(n-1)))/(4*(n-1)*(3*n-7)))
        end:
    seq(a(n), n=0..30);  # Alois P. Heinz, Jan 16 2014
  • Mathematica
    a[n_?EvenQ] := (n/2)!^2; a[n_?OddQ] := n*((n-1)/2)!^2; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Apr 15 2015 *)
  • PARI
    for(k=0,20,print1((2*k+1)*k!^2","(k+1)!^2",")) \\ Herman Jamke (hermanjamke(AT)fastmail.fm), Dec 27 2007

Formula

a(n) = (n/2)!^2 if n is even else n*((n-1)/2)!^2, cf. A092186. - Conjectured by Vladeta Jovovic, Aug 21 2007; proved (see the link) by Max Alekseyev, Aug 21 2007
a(n) = A062869(n,floor(n^2/4)) for n>=1. - Alois P. Heinz, Oct 02 2022

Extensions

a(10)-a(14) from Hugo Pfoertner, Sep 23 2004
More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), Dec 27 2007

A143861 Ulam's spiral (NNE spoke).

Original entry on oeis.org

1, 14, 59, 136, 245, 386, 559, 764, 1001, 1270, 1571, 1904, 2269, 2666, 3095, 3556, 4049, 4574, 5131, 5720, 6341, 6994, 7679, 8396, 9145, 9926, 10739, 11584, 12461, 13370, 14311, 15284, 16289, 17326, 18395, 19496, 20629, 21794, 22991, 24220
Offset: 1

Views

Author

Keywords

Comments

Stanislaw M. Ulam was doodling during the presentation of a "long and very boring paper" at a scientific meeting in 1963. The spiral is its result. Note that conforming to trigonometric conventions, the spiral begins on the abscissa and rotates counterclockwise. Other spirals, orientations, direction of rotation and initial values exist, even in the OEIS.
Also sequence found by reading the segment (1, 14) together with the line from 14, in the direction 14, 59, ..., in the square spiral whose vertices are the generalized decagonal numbers A074377. - Omar E. Pol, Nov 05 2012

References

  • Chris K. Caldwell & G. L. Honaker, Jr., Prime Curios! The Dictionary of Prime Number Trivia, CreateSpace, Sept 2009, pp. 2-3.

Crossrefs

Programs

  • GAP
    List([1..40], n-> ((32*n-35)^2 +55)/64); # G. C. Greubel, Nov 09 2019
  • Magma
    [((32*n-35)^2 +55)/64: n in [1..40]]; // G. C. Greubel, Nov 09 2019
    
  • Maple
    seq( ((32*n-35)^2 +55)/64, n=1..40); # G. C. Greubel, Nov 09 2019
  • Mathematica
    (* From Robert G. Wilson v, Oct 29 2011 *)
    f[n_]:= 16n^2 -35n +20; Array[f, 40]
    LinearRecurrence[{3,-3,1}, {1,14,59}, 40]
    FoldList[#1 + #2 &, 1, 32Range@ 10 - 19] (* End *)
    ((32*Range[40] -35)^2 +55)/64 (* G. C. Greubel, Nov 09 2019 *)
  • PARI
    a(n)=16*n^2-35*n+20 \\ Charles R Greathouse IV, Oct 29 2011
    
  • Sage
    [((32*n-35)^2 +55)/64 for n in (1..40)] # G. C. Greubel, Nov 09 2019
    

Formula

a(n) = 16*n^2 - 35*n + 20. - R. J. Mathar, Sep 08 2008
G.f.: x*(1 + 11*x + 20*x^2)/(1-x)^3. - Colin Barker, Aug 03 2012
E.g.f.: -20 + (20 - 19*x + 16*x^2)*exp(x). - G. C. Greubel, Nov 09 2019

A183169 Tree generated by the squares.

Original entry on oeis.org

1, 2, 4, 3, 16, 6, 9, 5, 256, 20, 36, 8, 81, 12, 25, 7, 65536, 272, 400, 24, 1296, 42, 64, 11, 6561, 90, 144, 15, 625, 30, 49, 10, 4294967296, 65792, 73984, 288, 160000, 420, 576, 29, 1679616, 1332, 1764, 48, 4096, 72, 121, 14
Offset: 1

Views

Author

Clark Kimberling, Dec 28 2010

Keywords

Comments

A permutation of the positive integers. See the comment at A183079 (tree generated by the triangular numbers). The leftmost numbers (1,2,4,16,...) are, after the initial 1, given by A001146. The rightmost numbers (1,2,3,5,7,10,...) are, after the initial 1, the iterates of the nonsquare function; see a comment at A033638.

Examples

			First levels of the tree:
......................1
......................2
...........4.....................3
.......16.......6...........9..........5
...256...20...36..8......81...12....25...7
		

Crossrefs

Formula

Let L(n) be the n-th square (A000290).
Let U(n) be the n-th nonsquare (A000037).
The tree-array T(n,k) is then given by rows:
T(0,0)=1; T(1,0)=2;
T(n,2j)=L(T(n-1),j);
T(n,2j+1)=U(T(n-1),j);
for j=0,1,...,2^(n-1)-1, n>=2.

A272904 Rectangular array, by antidiagonals: row n gives the positions of n in the Fibonacci-products fractal sequence, A272900.

Original entry on oeis.org

1, 2, 4, 3, 6, 8, 5, 9, 11, 15, 7, 12, 14, 19, 23, 10, 16, 18, 24, 28, 34, 13, 20, 22, 29, 33, 40, 46, 17, 25, 27, 35, 39, 47, 53, 61, 21, 30, 32, 41, 45, 54, 60, 69, 77, 26, 36, 38, 48, 52, 62, 68, 78, 86, 96, 31, 42, 44, 55, 59, 70, 76, 87, 95, 106, 116
Offset: 1

Views

Author

Clark Kimberling, May 10 2016

Keywords

Comments

This array is an interspersion. Every positive integer occurs exactly once, and each row is interspersed by each other row, except for initial terms.
Row 1: A033638 (quarter-squares plus 1)
Row 2: A002620 (quarter-squares)
Column 1: A267682 (conjectured)

Examples

			Northwest corner:
1     2     3     4     6     9     12    15
5     7     10    13    17    21    26    31
8     11    14    18    2     27    32    38
16    20    25    30    36    42    49    56
23    28    33    39    45    52    59    67
35    41    48    55    63    71    80    89
46    53    60    68    76    85    94    104
		

Crossrefs

Cf. A000045, A272900, A033638, A002620, A267682, A272908 (Lucas-products interspersion).

Programs

  • Mathematica
    z = 500; f[n_] := Fibonacci[n + 1]; u1 = Table[f[n], {n, 1, z}];
    u2 = Sort[Flatten[Table[f[i]*f[j], {i, 1, z}, {j, i, z}]]];
    uf = Table[Select[Range[80], MemberQ[u1, u2[[i]]/f[#]] &][[1]], {i, 1, z}]
    r[n_, k_] := Flatten[Position[uf, n]][[k]]
    TableForm[Table[r[n, k], {n, 1, 12}, {k, 1, 12}]]  (* A272904 array *)
    t = Table[r[n - k + 1, k], {n, 12}, {k, n, 1, -1}] // Flatten (* A272904 sequence *)

A278260 Least number with the same prime signature as {the n-th quarter-square}+1.

Original entry on oeis.org

1, 2, 2, 2, 2, 6, 2, 2, 6, 6, 2, 2, 2, 12, 6, 6, 2, 6, 6, 2, 6, 6, 6, 6, 2, 30, 6, 2, 2, 6, 2, 2, 30, 30, 2, 12, 8, 6, 6, 2, 2, 30, 2, 6, 12, 30, 6, 2, 2, 6, 30, 2, 6, 30, 2, 6, 6, 6, 6, 6, 12, 30, 6, 12, 6, 30, 2, 6, 6, 6, 6, 2, 6, 30, 30, 12, 2, 6, 6, 2, 6, 12, 2, 6, 6, 60, 6, 6, 6, 6, 6, 6, 30, 210, 6, 6, 6, 6, 30, 6, 2, 6, 6, 6, 6, 30, 6, 2, 2, 30, 30, 2, 6
Offset: 1

Views

Author

Antti Karttunen, Nov 22 2016

Keywords

Comments

Great majority of the terms seem to be primorials (A002110), 9149 of the first 10000, meaning also that the corresponding terms in A033638 are squarefree (A005117).

Crossrefs

Cf. A278162 (bisection).
Cf. also A278254, A278259.

Programs

Formula

a(n) = A046523(A033638(n)).

A113768 a(1) = 1, a(n+1) = a(n) + floor(a(n)^(1/3)).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 31, 34, 37, 40, 43, 46, 49, 52, 55, 58, 61, 64, 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108, 112, 116, 120, 124, 128, 133, 138, 143, 148, 153, 158, 163, 168, 173, 178, 183, 188, 193, 198, 203, 208, 213, 218, 224, 230, 236, 242, 248, 254, 260
Offset: 1

Views

Author

Jonathan Vos Post, Jan 19 2006

Keywords

Comments

First 17 terms identical to A079645 (Integer part of the cube root of n divides n). Replacing cube root by square root gives A033638.

Crossrefs

Programs

  • Magma
    [n le 1 select 1 else Self(n-1)+Floor(Self(n-1)^(1/3)): n in [1..75]]; // Vincenzo Librandi, Jul 29 2019
  • Maple
    A[1]:= 1:
    for n from 1 to 100 do A[n+1] := A[n] + floor(A[n]^(1/3)) od:
    seq(A[i],i=1..100); # Robert Israel, Jul 28 2019
  • Mathematica
    NestList[#+Floor[Surd[#,+3]]&,1,70] (* Harvey P. Dale, Jan 21 2013 *)

Formula

Conjecture: a(n) ~ (2/3)*n*sqrt((2/3)*n). - José María Grau Ribas, Feb 13 2024

Extensions

Corrected and extended by Harvey P. Dale, Jan 21 2013

A128282 Regular symmetric triangle, read by rows, whose left half consists of the positive integers.

Original entry on oeis.org

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

Views

Author

Philippe Deléham, May 03 2007

Keywords

Comments

Left half triangle is A000027 (positive integers) (compare with example triangle):
1;
2;
3, 4;
5, 6;
7, 8, 9;
10, 11, 12;
13, 14, 15, 16;
17, 18, 19, 20;
...

Examples

			Triangle begins:
   1;
   2,  2;
   3,  4,  3;
   5,  6,  6,  5;
   7,  8,  9,  8,  7;
  10, 11, 12, 12, 11, 10;
  13, 14, 15, 16, 15, 14, 13;
  17, 18, 19, 20, 20, 19, 18, 17;
  ...
		

Crossrefs

Cf. A000027, A000290, A033638 (1st column and right diagonal).

Programs

  • Maple
    A := proc(n,k) ## n >= 0 and k = 0 .. n
        1+(1/4)*n*(n+1)+min(k, n-k)+(1/2)*ceil((1/2)*n)
    end proc: # Yu-Sheng Chang, May 25 2020
  • Mathematica
    T[n_,k_]:=1+n*(n+1)/4+Min[k,n-k]+Ceiling[n/2]/2;Table[T[n,k],{n,0,11},{k,0,n}]//Flatten (* James C. McMahon, Jan 06 2025 *)

Formula

T(n,k) = T(n,n-k).
T(2*n,n) = (n+1)^2 = A000290(n+1).
T(n,0) = T(n,n) = A033638(n+1).
From Yu-Sheng Chang, May 25 2020: (Start)
O.g.f.: F(z,v) = (z/((-z+1)^3*(z+1)) - v^2*z/((-v*z+1)^3*(v*z+1)))/(1-v) + 1/((-z+1)*(-v*z+1)*(-v*z^2+1)).
T(n,k) = [v^k] (1/8)*(1-v^(n+1))*(2*(n+1)^2 - 1 - (-1)^n)/(1-v) + (v^(2+n) + (1/2*((sqrt(v)-1)^2*(-1)^n - (sqrt(v)+1)^2))*v^((1/2)*n + 1/2) + 1)/(1-v)^2.
T(n,k) = 1 + (1/4)*n*(n+1) + min(k, n-k) + (1/2)*ceiling((1/2)*n). (End)
T(n,k) = ((n+k-1)^2 - ((n+k-1) mod 2))/4 + min(n,k) for n and k >= 1, as an array. See Xie. - Michel Marcus, May 25 2021

Extensions

Name edited by Michel Marcus, May 25 2021

A161161 Irregular triangle of differences T(n,k) = A083906(n,k) - A083906(n-1,k) of q-Binomial coefficients.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 1, 2, 3, 5, 2, 2, 1, 1, 2, 3, 5, 7, 5, 4, 3, 1, 1, 1, 2, 3, 5, 7, 11, 8, 9, 7, 6, 2, 2, 1, 1, 2, 3, 5, 7, 11, 15, 14, 15, 15, 13, 11, 7, 4, 3, 1, 1, 1, 2, 3, 5, 7, 11, 15, 22, 21, 25, 25, 27, 23, 22, 15, 13, 8, 6, 2, 2, 1, 1, 2, 3, 5, 7, 11, 15, 22, 30, 32, 37, 42, 44
Offset: 1

Views

Author

Alford Arnold, Jun 04 2009

Keywords

Examples

			The differences between 5 3 4 3 1 and 4 2 2 yield row four : 1 1 2 3 1.
Triangle begins:
  1;
  1, 1;
  1, 1, 2;
  1, 1, 2, 3, 1;
  1, 1, 2, 3, 5, 2,  2;
  1, 1, 2, 3, 5, 7,  5,  4,  3,  1;
  1, 1, 2, 3, 5, 7, 11,  8,  9,  7,  6,  2,  2;
  1, 1, 2, 3, 5, 7, 11, 15, 14, 15, 15, 13, 11,  7,  4,  3,  1;
  1, 1, 2, 3, 5, 7, 11, 15, 22, 21, 25, 25, 27, 23, 22, 15, 13, 8, 6, 2, 2;
  ...
		

Crossrefs

Cf. A000079 (row sums), A002865 (antidiagonal sums), A077957 (alternating row sums).

Programs

  • Magma
    R:=PowerSeriesRing(Rationals(), 100);
    qBinom:= func< n,k,x | n eq 0 or k eq 0 select 1 else (&*[(1-x^(n-j))/(1-x^(j+1)): j in [0..k-1]]) >;
    A083906:= func< n,k | Coefficient(R!( (&+[qBinom(n,k,x): k in [0..n]]) ), k) >;
    A161161:= func< n,k | A083906(n,k) - A083906(n-1,k) >;
    [A161161(n,k): k in [0..Floor(n^2/4)], n in [1..12]]; // G. C. Greubel, Feb 13 2024
    
  • Maple
    A161161 := proc(n,m)
         A083906(n,m)-A083906(n-1,m) ;
    end proc:
    for n from 0 to 10 do
         for k from 0 to A033638(n)-1 do
             printf("%d, ", A161161(n, k)) ;
         od:
    od: # R. J. Mathar, Jul 13 2012
  • Mathematica
    b[n_, k_] := b[n, k] = SeriesCoefficient[Sum[QBinomial[n, m, q], {m, 0, n}], {q, 0, k}];
    T[n_, k_] := b[n, k] - b[n - 1, k];
    Table[Table[T[n, k], {k, 0, n^2/4}], {n, 1, 10}] // Flatten (* Jean-François Alcover, Nov 25 2017 *)
  • SageMath
    def t(n, k): # t = A083906
        if k<0 or k> (n^2//4): return 0
        elif n<2 : return n+1
        else: return 2*t(n-1, k) - t(n-2, k) + t(n-2, k-n+1)
    def A161161(n,k): return t(n, k) - t(n-1, k)
    flatten([[A161161(n, k) for k in range(int(n^2//4)+1)] for n in range(1,13)]) # G. C. Greubel, Feb 13 2024

Formula

Sum_{k=0..floor(n^2/4)} T(n, k) = A000079(n-1) (row sums).
Sum_{k=0..(n+2 - ceiling(sqrt(4*n)))} T(n-k, k) = A002865(n+1) (antidiagonal sums).
Sum_{k=0..floor(n^2/4)} (-1)^k*T(n, k) = A077957(n-1). - G. C. Greubel, Feb 13 2024

A211869 a(n) = Sum_{j=1..n-1} j*(n-j)*b^(j-1) with b = floor(n^2/4)+1.

Original entry on oeis.org

0, 1, 8, 98, 1712, 58985, 2541896, 187337236, 15687030920, 2014736789165, 280434300560320, 55591630021883014, 11642487182670742552, 3294318202343411333713, 969986091740868071844464, 371055858906757952457992360
Offset: 1

Views

Author

R. J. Cano, Feb 02 2013

Keywords

Comments

Equivalently, a(n) is the number having the digits (j*(n-j); j=1..n-1), in base b = floor(n^2/4)+1.
From R. J. Cano, Mar 03 2018: (Start)
If a(n) were converted to the base 1+floor(n^2/4)=A033638(n) then a palindrome would be obtained. Such palindrome is related to A215940(n!);
a(7)=2541896 and A033638(7)=13, giving the palindrome "6ACCA6". Such palindrome cannot be converted directly to decimal, but it might be defined instead from these digits the polynomial f(t)= 6*t^5 +10*t^4 +12*t^3 +12*t^2+10*t^1+6*t^0, then evaluating for t=10, we get f(10)=713306=A215940(7!). 713306 clearly looks distinct than "6ACCA6". f(11) and f(12) respectively are 1130256 with "7021A6", and 1722942 with "6B10A6". Now evaluating f(14) we get 3646530 and if converted to base 14 it yields "6ACCA6". The same happens with f(15) converted to base 15, f(16) converted to Hexadecimal, and also in general for f(y) converted to base y, if it were provided that y>=13.
Here A033638(n) gives the lower bound for the infinite set of bases where this behavior can be observed. For simplicity it is chosen the base A033638(n) when defining this sequence, although what we actually want is to keep the pattern generated by the products j*(n-j). (End)
This sequence together with A033638 and A215940 demonstrates the connection among permutation sets and palindromes obtained by symmetric products. - Alexander R. Povolotsky, Feb 08 2013

Examples

			For n=5, the four products are 1*4 = 4, 2*3 = 6, 3*2 = 6, 4*1 = 4, giving the base-7 concatenation 4664. In base 10, this is a(5) = 1712.
For a(6) we have that 1+floor(6^2/4) = 10 so there is no need of converting the concatenation to decimal. By definition the products are j*(n-j) for j in 1..5: 1*(6-1) = 5 = 5*(6-5), 2*(6-2) = 8 = 4*(6-2), 3*(6-3) = 9 so the result is a(6)=58985.
		

Crossrefs

Programs

  • PARI
    a(n,base=1+n^2\4)=sum(j=1, n-1, j*(n-j)*base^(n-1-j));

Formula

a(n) = Sum_{j=1..n-1} j*(n-j)*A033638(n)^(n-1-j).

A234305 Irregular triangle read by rows. Theoretical distribution of electrons based on the Janet's sequence A167268.

Original entry on oeis.org

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

Views

Author

Paul Curtz, Jan 02 2014

Keywords

Comments

a(n) is not A173642, a compact Bohr-Stoner model (1924), modified by Charles Janet in 1930. The good distribution is A168208.
Only sequences N16(n) in A234398 are used:
N16(1)= 1 followed by 2's = A040000,
N16(2)= 1, 2, 3, 4, 5, followed by 6's = A101272,
N16(3)= 1 to 9, followed by 10's,
N16(4)= 1 to 13, followed by 14's, etc.
The distribution by rows are in the example.
The N16(n)'s are respectively on columns (hence triangle T)
1, 2, 4, 6, 9, 12, 16, 20, 25, 30, 36, A002620(n+2)
3, 5, 8, 11, 15, 19, 24, 29, 35, A024206(n+2)
7, 10, 14, 18, 23, 28, 34, A014616(n+3)
13, 17, 22, 27, 33, A004116(n+4)
21, 26, 32,
31, etc.
See A163255.
Antidiagonals give the natural numbers A000027, like rows sums in the example.
A033638=1, 1, 2, 3, 5, 7,... is upon the triangle T.

Examples

			1,      H
2,       He
2, 1,    Li
2, 2,    Be
2, 2, 1,
2, 2, 2,
2, 2, 3,
2, 2, 4,
2, 2, 5,
2, 2, 6,
2, 2, 6, 1,
2, 2, 6, 2,
2, 2, 6, 2, 1,
2, 2, 6, 2, 2,
2, 2, 6, 2, 3,
2, 2, 6, 2, 4,
2, 2, 6, 2, 5,
2, 2, 6, 2, 6,
2, 2, 6, 2, 6, 1,
2, 2, 6, 2, 6, 2,
2, 2, 6, 2, 6, 2, 1,
2, 2, 6, 2, 6, 2, 2,
2, 2, 6, 2, 6, 2, 3, etc.
		

Crossrefs

Cf. A002061, A002522 (or A160457), A014206, A059100, diagonals of the triangle T. A004526.
Previous Showing 31-40 of 58 results. Next