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 41-50 of 213 results. Next

A335661 The squares visited on a square (Ulam) spiral, with a(1) = 1 and a(2) = 2, when stepping to the closest unvisited square containing a number that shares a common divisor > 1 with the number in the current square. If two or more such squares are the same distance from the current square then the one with the smallest number is chosen.

Original entry on oeis.org

1, 2, 4, 6, 8, 22, 20, 40, 18, 39, 69, 105, 150, 104, 66, 38, 36, 63, 98, 62, 34, 14, 12, 3, 15, 5, 35, 60, 33, 30, 55, 88, 54, 87, 129, 177, 234, 299, 455, 375, 456, 374, 300, 235, 130, 90, 57, 93, 135, 186, 134, 92, 58, 32, 56, 91, 133, 182, 132, 180, 237
Offset: 1

Views

Author

Scott R. Shannon, Jun 17 2020

Keywords

Comments

Any even number on the square spiral has 4 diagonally adjacent squares which contain an even number and thus, unless all four such squares have been previously visited, a step to one of those adjacent squares, the one containing the smallest number, will always be possible. Any visited square containing a prime number will need to step to, and be stepped to from, a square containing a multiple of that prime number.
In the first 10 million terms the longest required step is from a(97528) = 5981, a prime number which has coordinates (39,13) relative to the starting 1-square, to a(97529) = 167468 (27*5981), with coordinates (205,-18), a step of length sqrt(28517), approximately 168.9 units. This is an extremely large step length relative to the total number of steps taken up to that point - see the attached link image. It is not surpassed by any subsequent step up to 10 million steps. If the maximum step distance between adjacent terms has a finite value or is unbounded as n increases is unknown. The largest difference between terms is for a(9404208) = 8964653 to a(9404209) = 10485343, a difference of 1520690.
In the first 10 million terms the smallest unvisited square is 37, which has coordinates (-3,3) relative to the starting 1-square. It is unknown if this square, and similar unvisited squares near the origin, is eventually visited for very large values of n or is never visited. The longest run of diagonal steps in the same direction to adjacent smaller even numbers is 52, from a(3979714) = 5051162 to a(3979766) = 4594498.

Examples

			a(3) = 4 as a(2) = 2 is surrounded by eight adjacent squares with numbers 3,4,1,8,9,10,11,12. The unvisited squares 1 unit away, 3,9,11 have no common factor with 2. Of the other squares sqrt(2) units away, 4,8,10,12, all share the common factor 2 with a(2), and the smallest of those is 4.
a(10) = 39 as a(9) = 18 is surrounded by adjacent squares 5,6,19,40,39,38,17,16. The square containing 39 is 1 unit directly left of 18 and shares the common factor 3. The other squares one unit away, 5,17,19, have no common factor with 18.
		

Crossrefs

A367582 Triangle read by rows where T(n,k) is the number of integer partitions of n whose multiset multiplicity kernel (in which each multiplicity becomes the least element of that multiplicity), sums to k.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 2, 1, 1, 0, 1, 1, 2, 2, 1, 0, 1, 3, 3, 2, 1, 1, 0, 1, 1, 4, 3, 3, 2, 1, 0, 1, 3, 5, 4, 4, 3, 1, 1, 0, 1, 2, 6, 4, 8, 3, 3, 2, 1, 0, 1, 3, 7, 9, 6, 7, 4, 3, 1, 1, 0, 1, 1, 8, 7, 11, 9, 9, 4, 3, 2, 1
Offset: 0

Views

Author

Gus Wiseman, Nov 28 2023

Keywords

Comments

We define the multiset multiplicity kernel MMK(m) of a multiset m by the following property, holding for all distinct multiplicities k >= 1. If S is the set of elements of multiplicity k in m, then min(S) has multiplicity |S| in MMK(m). For example, MMK({1,1,2,2,3,4,5}) = {1,1,3,3,3}, and MMK({1,2,3,4,5,5,5,5}) = {1,1,1,1,5}. As an operation on multisets, MMK is represented by A367579, and as an operation on their Heinz numbers, it is represented by A367580.

Examples

			Triangle begins:
  1
  0  1
  0  1  1
  0  1  1  1
  0  1  2  1  1
  0  1  1  2  2  1
  0  1  3  3  2  1  1
  0  1  1  4  3  3  2  1
  0  1  3  5  4  4  3  1  1
  0  1  2  6  4  8  3  3  2  1
  0  1  3  7  9  6  7  4  3  1  1
  0  1  1  8  7 11  9  9  4  3  2  1
  0  1  5 10 11 13 10 11  6  5  3  1  1
  0  1  1 10 11 17 14 18 10  9  4  3  2  1
  0  1  3 12 17 19 18 22 14 12  8  4  3  1  1
  0  1  3 12 15 27 19 31 19 19 10  9  5  3  2  1
  0  1  4 15 23 27 31 33 24 26 18 12  8  4  3  1  1
  0  1  1 14 20 35 33 48 32 37 25 20 11 10  4  3  2  1
Row n = 7 counts the following partitions:
  (1111111)  (61)  (421)     (52)     (4111)  (511)  (7)
                   (2221)    (331)    (322)   (43)
                   (22111)   (31111)  (3211)
                   (211111)
		

Crossrefs

Column k = 2 is A000005(n) - 1 = A032741(n).
Row sums are A000041.
The case of constant partitions is A051731, row sums A000005.
The corresponding rank statistic is A367581, row sums of A367579.
A072233 counts partitions by number of parts.
A091602 counts partitions by greatest multiplicity, least A243978.
A116608 counts partitions by number of distinct parts.
A116861 counts partitions by sum of distinct parts.

Programs

  • Mathematica
    mmk[q_]:=With[{mts=Length/@Split[q]}, Sort[Table[Min@@Select[q, Count[q,#]==i&], {i,mts}]]];
    Table[Length[Select[IntegerPartitions[n], Total[mmk[#]]==k&]], {n,0,10}, {k,0,n}]

A384854 The number of divisors d of n such that (-d)^d == d (mod n).

Original entry on oeis.org

1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 5, 1, 1, 1, 2, 2, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 1, 1, 1, 3, 2, 1, 1, 2, 1, 1, 1, 2, 1, 1
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 10 2025

Keywords

Crossrefs

Programs

  • Magma
    [1+#[s: s in [1..n-1] | n mod s eq 0 and Modexp((-s), s, n) eq s]: n in [1..100]];
    
  • Maple
    a:= n-> add(`if`((-d)&^d-d mod n=0, 1, 0), d=numtheory[divisors](n)):
    seq(a(n), n=1..100);  # Alois P. Heinz, Jun 10 2025
  • PARI
    a(n) = sumdiv(n, d, Mod(-d, n)^d == d); \\ Michel Marcus, Jun 11 2025

Formula

a(n) = 1 + number of proper divisors h of n such that (-h)^h = h (mod n).

A293514 a(n) = Product_{d|n, d>1} prime(A286561(n,d)), where A286561(n,d) gives the highest exponent of d dividing n.

Original entry on oeis.org

1, 2, 2, 6, 2, 8, 2, 20, 6, 8, 2, 48, 2, 8, 8, 84, 2, 48, 2, 48, 8, 8, 2, 320, 6, 8, 20, 48, 2, 128, 2, 264, 8, 8, 8, 864, 2, 8, 8, 320, 2, 128, 2, 48, 48, 8, 2, 2688, 6, 48, 8, 48, 2, 320, 8, 320, 8, 8, 2, 3072, 2, 8, 48, 1560, 8, 128, 2, 48, 8, 128, 2, 11520, 2, 8, 48, 48, 8, 128, 2, 2688, 84, 8, 2, 3072, 8, 8, 8, 320
Offset: 1

Views

Author

Antti Karttunen, Nov 11 2017

Keywords

Examples

			For n = 24, its divisors larger than one are: 2, 3, 4, 6, 8, 12, 24. Only 2 has valuation > 1, namely A286561(24,2) = 3 (as 2^3 divides 24), while the other six have valuation 1. Thus a(24) = prime(1)^6 * prime(3) = 64*5 = 320.
For n = 64, its divisors larger than one are: 2, 4, 8, 16, 32, 64. We see that 2^6 = 4^3 = 8^2 = 64, while valuation of the last three 16, 32 and 64 is 1. Thus a(64) = prime(1)^3 * prime(2) * prime(3) * prime(6) = 2^3 * 3 * 5 * 13 = 1560.
		

Crossrefs

Programs

  • PARI
    A293514(n) = { my(m=1); fordiv(n,d,if(d>1, m *= prime(valuation(n,d)))); m; };

Formula

a(n) = Product_{d|n, d>1} A000040(A286561(n,d)).
Other identities. For all n >= 1:
A001222(a(n)) = A032741(n).
A007814(a(n)) = A056595(n) [See A046951.]
1+A056239(a(n)) = A169594(n).
A064989(a(n)) = A293515(n).

A122934 Triangle T(n,k) = number of partitions of n into k parts, with each part size divisible by the next.

Original entry on oeis.org

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

Views

Author

Keywords

Examples

			Triangle starts:
  1;
  1, 1;
  1, 1, 1;
  1, 2, 1, 1;
  1, 1, 2, 1, 1;
  1, 3, 2, 2, 1, 1;
  ...
T(6,3) = 2 because of the 3 partitions of 6 into 3 parts, [4,1,1] and [2,2,2] meet the definition; [3,2,1] fails because 2 does not divide 3.
		

Crossrefs

Column k=1..4 give A057427, A032741, A049822, A121895.
Row sums give A003238.

Programs

  • Mathematica
    T[, 1] = 1; T[n, k_] := T[n, k] = DivisorSum[n, If[#==1, 0, T[#-1, k-1]]& ]; Table[T[n, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, Sep 30 2016 *)

Formula

T(n,1) = 1. T(n,k+1) = Sum_{d|n, d1} T(d-1,k).

A294902 Number of proper divisors of n that are in A175526.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 2, 0, 2, 0, 2, 0, 0, 0, 4, 0, 0, 1, 2, 0, 3, 0, 3, 0, 0, 0, 5, 0, 0, 0, 4, 0, 3, 0, 2, 2, 0, 0, 6, 0, 1, 0, 2, 0, 4, 0, 4, 0, 0, 0, 7, 0, 0, 2, 4, 0, 3, 0, 2, 0, 3, 0, 8, 0, 0, 1, 2, 0, 3, 0, 6, 2, 0, 0, 7, 0, 0, 0, 4, 0, 7, 0, 2, 0, 0, 0, 8, 0, 2, 2, 4, 0, 3, 0, 4, 3, 0, 0, 8, 0, 3, 0, 6, 0, 3, 0, 2, 2, 0, 0, 11
Offset: 1

Views

Author

Antti Karttunen, Nov 10 2017

Keywords

Crossrefs

Programs

  • Mathematica
    q[n_] := DivisorSum[n, DigitCount[#, 2, 1] &] > 2 * DigitCount[n, 2, 1]; a[n_] := DivisorSum[n, 1 &, # < n && q[#] &]; Array[a, 100] (* Amiram Eldar, Jul 20 2023 *)
  • PARI
    A292257(n) = sumdiv(n,d,(dA294905(n) = (A292257(n) <= hammingweight(n));
    A294902(n) = sumdiv(n,d,(dA294905(d)));

Formula

a(n) = Sum_{d|n, dA294905(d)).
a(n) = A294904(n) + A294905(n) - 1.
a(n) + A294901(n) = A032741(n).

A294927 Number of proper divisors of n that are nondeficient (A023196).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 14 2017

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := DivisorSum[n, 1 &, # < n && DivisorSigma[1, #] >= 2*# &]; Array[a, 100] (* Amiram Eldar, Mar 14 2024 *)
  • PARI
    A294927(n) = sumdiv(n, d, (d=(2*d)));

Formula

a(n) = Sum_{d|n, dA294936(d).
a(n) + A294926(n) = A032741(n).

A294929 Number of proper divisors of n that are abundant (A005101).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 14 2017

Keywords

Examples

			The proper divisors of 24 are 1, 2, 3, 4, 6, 8, 12. Only one of these, 12, is abundant (in A005101), thus a(24) = 1.
The proper divisors of 120 are 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 20, 24, 30, 40, 60. Six of these are abundant: 12, 20, 24, 30, 40, 60, thus a(120) = 6.
		

Crossrefs

Programs

Formula

a(n) = Sum_{d|n, dA294937(d).
a(n) = A080224(n) - A294937(n).
a(n) + A294928(n) = A032741(n).

A051778 Triangle read by rows, where row (n) = n mod (n-1), n mod (n-2), n mod (n-3), ...n mod 2.

Original entry on oeis.org

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

Views

Author

Asher Auel, Dec 09 1999

Keywords

Comments

Central terms: a(2*n+1,n) = n for n > 0. - Reinhard Zumkeller, Dec 03 2014
Deleting column 1 of the array at A051126 gives the array A051778 in square format (see Example). - Clark Kimberling, Feb 04 2016

Examples

			row (7) = 7 mod 6, 7 mod 5, 7 mod 4, 7 mod 3, 7 mod 2 = 1, 2, 3, 1, 1.
1;
1  0 ;
1  2  1 ;
1  2  0  0 ;
1  2  3  1  1 ;
1  2  3  0  2  0 ;
1  2  3  4  1  0  1 ;
1  2  3  4  0  2  1  0 ;
1  2  3  4  5  1  3  2  1 ;
1  2  3  4  5  0  2  0  0  0 ;
1  2  3  4  5  6  1  3  1  1  1 ;
Northwest corner of square array:
1 1 1 1 1 1 1 1 1 1 1
0 2 2 2 2 2 2 2 2 2 2
1 0 3 3 3 3 3 3 3 3 3
0 1 0 4 4 4 4 4 4 4 4
1 2 1 0 5 5 5 5 5 5 5
0 0 2 1 0 6 6 6 6 6 6
1 1 3 2 1 0 7 7 7 7 7
- _Clark Kimberling_, Feb 04 2016
		

Crossrefs

Cf. A004125 (row sums), A000027 (central terms), A049820 (number of nonzeros per row), A032741 (number of ones per row), A070824 (number of zeros per row).

Programs

  • Haskell
    a051778 n k = a051778_tabl !! (n-3) !! (k-1)
    a051778_row n = a051778_tabl !! (n-3)
    a051778_tabl = map (\xs -> map (mod (head xs + 1)) xs) $
                       iterate (\xs -> (head xs + 1) : xs) [2]
    -- Reinhard Zumkeller, Dec 03 2014
  • Mathematica
    Flatten[Table[Mod[n,i],{n,3,20},{i,n-1,2,-1}]] (* Harvey P. Dale, Sep 09 2012 *)
    TableForm[Table[Mod[n, k], {n, 1, 12}, {k, 2, 12}]] (* square *)
    (* Clark Kimberling, Feb 04 2016 *)

A336570 Number of maximal sets of proper divisors d|n, d < n, all belonging to A130091 (numbers with distinct prime multiplicities) and forming a divisibility chain.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jul 29 2020

Keywords

Comments

A number's prime signature (row n of A124010) is the sequence of positive exponents in its prime factorization, so a number has distinct prime multiplicities iff all the exponents in its prime signature are distinct.

Examples

			The a(n) sets for n = 36, 120, 144, 180 (ones not shown):
  {2,18}    {3,12,24}    {2,18,72}       {2,18}
  {3,12}    {5,20,40}    {3,9,18,72}     {3,12}
  {2,4,12}  {2,4,8,24}   {3,12,24,48}    {5,20}
  {3,9,18}  {2,4,8,40}   {3,12,24,72}    {5,45}
            {2,4,12,24}  {2,4,8,16,48}   {2,4,12}
            {2,4,20,40}  {2,4,8,24,48}   {2,4,20}
                         {2,4,8,24,72}   {3,9,18}
                         {2,4,12,24,48}  {3,9,45}
                         {2,4,12,24,72}
		

Crossrefs

A336569 is the version for chains containing n.
A336571 is the non-maximal version.
A000005 counts divisors.
A001055 counts factorizations.
A007425 counts divisors of divisors.
A032741 counts proper divisors.
A045778 counts strict factorizations.
A071625 counts distinct prime multiplicities.
A074206 counts strict chains of divisors from n to 1.
A130091 lists numbers with distinct prime multiplicities.
A181796 counts divisors with distinct prime multiplicities.
A253249 counts chains of divisors.
A336422 counts divisible pairs of divisors, both in A130091.
A336424 counts factorizations using A130091.
A336500 counts divisors of n in A130091 with quotient also in A130091.

Programs

  • Mathematica
    strsigQ[n_]:=UnsameQ@@Last/@FactorInteger[n];
    fasmax[y_]:=Complement[y,Union@@(Most[Subsets[#]]&/@y)];
    strses[n_]:=If[n==1,{{}},Join@@Table[Append[#,d]&/@strses[d],{d,Select[Most[Divisors[n]],strsigQ]}]];
    Table[Length[fasmax[strses[n]]],{n,100}]
Previous Showing 41-50 of 213 results. Next