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 81-90 of 91 results. Next

A277085 Irregular triangle read by rows: T(n,k) = number of size k subsets of S_n that remain unchanged by a rotation of 90 degrees.

Original entry on oeis.org

1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 2, 4, 6, 10, 14, 20, 26, 31, 36, 40, 44, 44, 44, 40, 36, 31, 26, 20, 14, 10, 6, 4, 2, 1, 1, 2, 4, 6, 34, 62, 116, 170, 547, 924, 1624, 2324, 5572, 8820, 14616, 20412, 40509, 60606, 95004, 129402, 224406, 319410
Offset: 0

Views

Author

Christian Bean, Sep 28 2016

Keywords

Comments

A permutation, p, can be thought of as a set of points (i, p(i)). If you plot all the points and rotate the picture by 90 degrees then you get a permutation back.
T(n,k) is the number of size k subsets that remain unchanged by a rotation of 90 degrees.

Examples

			For n = 4 and k = 2, the subsets unchanged by a 90-degree rotation are {4321,1234}, {4231,1324}, {3412,2143} and {3142,2413}. Hence T(4,2) = 4.
Triangle starts:
1, 1;
1, 1;
1, 0, 1;
1, 0, 1, 0, 1, 0, 1;
		

Crossrefs

Row lengths give A038507.

Formula

T(n,k) = Sum_( C( R(n) - T(n), i ) * Sum_(C(n! - R(n), j) * C(T(n), k - 4*i - 2*j) for j in [0..floor((k-4*i)/2)] for i in [0..floor(k/4)] ) where R(n) = A037223(n) and T(n) = A037224(n).

A304935 a(n) is the largest possible integer value for sqrt(0 1 2 ... n), where one is allowed to place any mixture of +'s and *'s in the n blank spaces.

Original entry on oeis.org

1, 0, 0, 5, 11, 6, 71, 19, 123, 33, 174, 426, 174, 233, 625, 816, 5695, 3656, 15936, 246960, 24234, 24234, 35151, 140604, 177399, 250982, 1304130, 1304130, 1304130, 1304130, 5532955, 5532955, 58136459, 8525544, 8525544, 58136459, 941988492, 58136459, 941988492
Offset: 1

Views

Author

Andy Niedermaier, May 21 2018

Keywords

Comments

Inspired by a test ARML problem from 2018, which asked students to determine a(8).

Examples

			a(2) = a(3) = 0, since no positive squares are achievable.
Some examples:
a(7) = 71 = sqrt(0+1+2*3*4*5*6*7).
a(8) = 19 = sqrt(0+1*2+3+4*5+6*7*8).
a(20) = 246960 = sqrt(0+1*2*3*4*5*6*7*8*9*10*11+12*13*14*15*16*17*18*19*20)
		

Crossrefs

Upper-bounded by sqrt(A038507).

Programs

  • Mathematica
    sqStrTest[n_] := Module[{bVal, bStr, i, j, iB, mVal, mStr},
      bVal = -1;
      For[i = 0, i < 2^n, i++,
       iB = IntegerDigits[i, 2];
       While[Length[iB] < n, PrependTo[iB, 0]];
       mStr = "0";
       For[j = 1, j <= n, j++,
        mStr = StringJoin[mStr, If[iB[[j]] == 0, "+", "*"], ToString[j]]];
       mVal = ToExpression[mStr];
       If[Sqrt[mVal] == Floor[Sqrt[mVal]],
        If[mVal > bVal, {bVal, bStr} = {mVal, mStr}]
        ]
       ];
      Print[{Sqrt[bVal], bVal, bStr}]]
  • PARI
    See Links section.

Extensions

More terms from Rémy Sigrist, May 22 2018

A358279 a(n) = Sum_{d|n} (d-1)! * d^(n/d).

Original entry on oeis.org

1, 3, 7, 29, 121, 747, 5041, 40433, 362935, 3629433, 39916801, 479006531, 6227020801, 87178326609, 1307674371487, 20922790212353, 355687428096001, 6402373709021811, 121645100408832001, 2432902008212950169, 51090942171709691335, 1124000727778046766849
Offset: 1

Views

Author

Seiichi Manyama, Nov 08 2022

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := DivisorSum[n, (# - 1)! * #^(n/#) &]; Array[a, 22] (* Amiram Eldar, Aug 30 2023 *)
  • PARI
    a(n) = sumdiv(n, d, (d-1)!*d^(n/d));
    
  • PARI
    my(N=30, x='x+O('x^N)); Vec(sum(k=1, N, k!*x^k/(1-k*x^k)))

Formula

G.f.: Sum_{k>0} k! * x^k/(1 - k * x^k).
If p is prime, a(p) = 1 + p!.

A358593 a(n) = n! * Sum_{d|n} d^(n-d) / d!^(n/d).

Original entry on oeis.org

1, 3, 7, 49, 121, 2701, 5041, 219521, 1587601, 33446701, 39916801, 17731796545, 6227020801, 2879710009177, 98069239768501, 2418218838097921, 355687428096001, 2832293713653708877, 121645100408832001, 2295597943489176040001, 71029619657111138063041
Offset: 1

Views

Author

Seiichi Manyama, Feb 23 2023

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := n! * DivisorSum[n, #^(n-#) / #!^(n/#) &]; Array[a, 20] (* Amiram Eldar, Jul 31 2023 *)
  • PARI
    a(n) = n!*sumdiv(n, d, d^(n-d)/d!^(n/d));
    
  • PARI
    my(N=30, x='x+O('x^N)); Vec(serlaplace(sum(k=1, N, x^k/(k!-(k*x)^k))))

Formula

E.g.f.: Sum_{k>0} x^k / (k! - (k * x)^k).
If p is prime, a(p) = 1 + p! = A038507(p).

A180325 a(n) = k is the smallest number such that n is the number of distinct primes dividing k! + 1.

Original entry on oeis.org

1, 6, 9, 31, 16, 18, 40, 89
Offset: 1

Views

Author

Michel Lagneau, Jan 18 2011

Keywords

Comments

A greedy inverse to A066856. - R. J. Mathar, Jan 21 2011

Examples

			a(6) = 18 because the 6 distinct primes dividing 18! + 1 = 6402373705728001
  are {19, 23, 29, 61, 67, 123610951}.
		

Crossrefs

Cf. A038507.

Programs

  • Maple
    with(numtheory):for n from 1 to 7 do:ind:=0:for k from 1 to 50 while(ind=0)
      do: x:=k!+1:y:=nops(factorset(x)):if y=n then ind:=1:printf(`%d, `,k):else fi:od:
      od:

A264890 Integers k such that k! + 1 is the sum of 2 nonzero squares.

Original entry on oeis.org

0, 1, 4, 8, 11, 12, 17, 25, 26, 27, 28, 29, 37, 38, 41, 45, 48, 54, 60, 67, 71, 73, 75, 77, 88, 92, 94, 114, 115, 116, 119, 133
Offset: 1

Views

Author

Altug Alkan, Nov 27 2015

Keywords

Examples

			a(3) = 4 because 4! + 1 = 4^2 + 3^2.
		

Crossrefs

Programs

  • Mathematica
    Flatten@ Position[Map[Length, Map[Map[Length, PowersRepresentations[#, 2, 2] &@(#! + 1) /. 0 -> Nothing] &, Range[0, 48]] /. 1 -> Nothing], n_ /; n > 0] - 1 (* Michael De Vlieger, Nov 28 2015 *)
  • PARI
    is(n) = { for(i=1, #n=factor(n!+1)~%4, n[1, i]==3 && n[2, i]%2 && return); n && (vecmin(n[1, ])==1 || (n[1, 1]==2 && n[2, 1]%2)) }

Extensions

a(25)-a(32) from Jinyuan Wang, May 22 2021

A277086 Irregular triangle read by rows: T(n,k) = number of size k subsets of S_n with respect to the symmetries of the square.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 5, 5, 5, 2, 1, 1, 7, 56, 317, 1524, 5733, 17728, 44767, 94427, 166786, 249624, 316950, 343424, 316950, 249624, 166786, 94427, 44767, 17728, 5733, 1524, 317, 56, 7, 1, 1, 23, 1012, 36125, 1035496, 23878229, 456936220, 7437730463
Offset: 0

Views

Author

Christian Bean, Sep 28 2016

Keywords

Comments

A permutation, p, can be thought of as a set of points (i, p(i)). In this viewpoint it is natural to consider the symmetries of the square.
T(n,k) is the number of symmetry classes of subsets of size k from S_n.

Examples

			Triangle starts:
1, 1;
1, 1;
1, 1, 1;
1, 2, 5, 5, 5, 2, 1;
		

Crossrefs

Rows lengths give A038507.

Formula

T(n,k) = 1/8 * (C(n,k) + 2*A277080(n,k) + 2*A277081(n,k) + 2*A277085(n,k) + A277083(n,k)).

A344488 Numbers that start a product crescendo of record length.

Original entry on oeis.org

1, 2, 3, 7, 47, 181, 1307, 2503, 40973, 46833, 109177, 2885373, 11744311, 192968969, 899988745
Offset: 1

Views

Author

Jon Wild, May 20 2021

Keywords

Comments

A product crescendo is a sequence of successive integers that can be written as products j * k where the j's form a strictly increasing sequence and the k's form a strictly decreasing sequence.
From Jon E. Schoenfield, May 22 2021: (Start)
a(16) <= 13399626241.
Numbers that start long product crescendos, but are not necessarily of record length, are easy to find by testing numbers of the form 1 + m*lcm(1..k) for sufficiently large m and k. E.g., the ones that start at 13399626241 = 1 + 18592*lcm(1..16), 442452890881 = 1 + 36112*lcm(1..17), and 521688126961 = 1 + 2241*lcm(1..19) have lengths 37, 39, and 41 respectively. (End)
The sequence is infinite as for any n >= 0, A038507(n) starts a product crescendo of length >= n. - Rémy Sigrist, May 22 2021

Examples

			181 is in the list because it begins a product crescendo that is longer than any beginning at any smaller number. Here is the crescendo:
    1 * 181  =  181
    2 *  91  =  182
    3 *  61  =  183
    4 *  46  =  184
    5 *  37  =  185
    6 *  31  =  186
   11 *  17  =  187
   47 *   4  =  188
   63 *   3  =  189
   95 *   2  =  190
  191 *   1  =  191
This set of 11 products forms a longer crescendo than the previous record (which started at 47), and is the longest until the set of 13 products it is possible to write starting from 1307 (the next entry in the sequence).
Additional example: the crescendo from 2885373 (length 27) goes:
        1 * 2885373 = 2885373
        2 * 1442687 = 2885374
        5 * 577075  = 2885375
        6 * 480896  = 2885376
       11 * 262307  = 2885377
       19 * 151862  = 2885378
       21 * 137399  = 2885379
       89 * 32420   = 2885380
      859 * 3359    = 2885381
     1458 * 1979    = 2885382
     4817 * 599     = 2885383
    12437 * 232     = 2885384
    19365 * 149     = 2885385
    33551 * 86      = 2885386
    93077 * 31      = 2885387
   131154 * 22      = 2885388
   221953 * 13      = 2885389
   288539 * 10      = 2885390
   320599 * 9       = 2885391
   360674 * 8       = 2885392
   412199 * 7       = 2885393
   480899 * 6       = 2885394
   577079 * 5       = 2885395
   721349 * 4       = 2885396
   961799 * 3       = 2885397
  1442699 * 2       = 2885398
  2885399 * 1       = 2885399
		

Crossrefs

Cf. A038507.

Programs

  • PARI
    b(n)={if(n==1, 1, my(m=1); for(k=1, oo, fordiv(n+k, d, if(d>m, m=d; break)); if(m==n+k, return(k+1))))}
    lista(lim)={my(m=0); for(n=1, lim, my(t=b(n)); if(t > m, print1(n, ", "); m=t))} \\ Andrew Howroyd, May 21 2021

Extensions

a(13)-a(14) from Rémy Sigrist, May 21 2021
a(15) from Jon E. Schoenfield, May 21 2021

A357296 Expansion of e.g.f. Sum_{k>0} x^k / (k! * (1 - x^k/k)).

Original entry on oeis.org

1, 3, 7, 31, 121, 851, 5041, 43261, 369601, 3748249, 39916801, 490801081, 6227020801, 87861842641, 1310800947457, 21018206008801, 355687428096001, 6419518510204801, 121645100408832001, 2435836129700029057, 51102829650622464001, 1124549558817839481601
Offset: 1

Views

Author

Seiichi Manyama, Feb 23 2023

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := n! * DivisorSum[n, 1/(#^(n/#-1) * #!) &]; Array[a, 20] (* Amiram Eldar, Jul 31 2023 *)
  • PARI
    my(N=30, x='x+O('x^N)); Vec(serlaplace(sum(k=1, N, x^k/(k!*(1-x^k/k)))))
    
  • PARI
    a(n) = n!*sumdiv(n, d, 1/(d^(n/d-1)*d!));

Formula

a(n) = n! * Sum_{d|n} 1 / (d^(n/d-1) * d!).
If p is prime, a(p) = 1 + p! = A038507(p).

A358178 a(n) is the cardinality of the set of distinct pairwise gcd's of {1! + 1, ..., n! + 1}.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 2, 2, 3, 4, 4, 4, 4, 4, 4, 5, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 11, 12, 12, 12, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18
Offset: 1

Views

Author

Gleb Ivanov, Nov 02 2022

Keywords

Examples

			For n = 6 initial set is {1+1, 2+1, 6+1, 24+1, 120+1, 720+1} and after applying gcd for each distinct pair of elements we get {1, 7} set with cardinality of a(6) = 2.
		

Crossrefs

Programs

  • Python
    from math import gcd, factorial
    from itertools import combinations
    f, terms = [2,], []
    for i in range(2,100):
        f.append(factorial(i)+1)
        terms.append(len(set([gcd(*t) for t in combinations(f, 2)])))
    print(terms)
    
  • Python
    from math import gcd
    from itertools import count, islice
    def A358178_gen(): # generator of terms
        m, f, g = 1, [], set()
        for n in count(1):
            m *= n
            g |= set(gcd(d,m+1) for d in f)
            f.append(m+1)
            yield len(g)
    A358178_list = list(islice(A358178_gen(),20)) # Chai Wah Wu, Dec 15 2022
Previous Showing 81-90 of 91 results. Next