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

A247905 Start with a single hexagon; at n-th generation add a hexagon at each expandable vertex (this is the "vertex to side" version); a(n) is the sum of all label values at n-th generation. (See comment for construction rules.)

Original entry on oeis.org

1, 7, 19, 43, 79, 139, 223, 355, 535, 811, 1183, 1747, 2503, 3643, 5167, 7459, 10519, 15115, 21247, 30451, 42727, 61147, 85711, 122563, 171703, 245419, 343711, 491155, 687751, 982651, 1375855, 1965667, 2752087, 3931723, 5504575, 7863859, 11009575, 15728155, 22019599, 31456771, 44039671, 62914027, 88079839, 125828563, 176160199, 251657659
Offset: 0

Views

Author

Kival Ngaokrajang, Sep 26 2014

Keywords

Comments

Refer to A247620, which is the "vertex to vertex" expansion version. For this case, the expandable vertices of the existing generation will contact the sides of the new ones i.e. "vertex to side" expansion version. Let us assign the label "1" the hexagon at the origin; at n-th generation add a hexagon at each expandable vertex, i.e. each vertex where the added generations will not overlap the existing ones, although overlaps among new generations are allowed. The non-overlapping hexagons will have the same label value as a predecessor; for the overlapping ones, the label value will be sum of label values of predecessors. a(n) is the sum of all label values at n-th generation. The hexagons count is A003215. See illustration. For n >= 1, (a(n) - a(n-1))/6 is A027383.

Crossrefs

Cf. Vertex to vertex version: A061777, A247618, A247619, A247620.
Cf. Vertex to side version: A101946, A247903, A247904.

Programs

  • Magma
    [3*2^(n/2)*((7+5*Sqrt(2)) + (-1)^n*(7-5*Sqrt(2))) -(12*n+41): n in [0..50]]; // G. C. Greubel, Feb 17 2022
    
  • Mathematica
    LinearRecurrence[{2,1,-4,2}, {1,7,19,43}, 50] (* G. C. Greubel, Feb 17 2022 *)
  • PARI
    {
    b=0; a=1; print1(1, ", ");
    for (n=0, 50,
         b=b+2^floor(n/2);
         a=a+6*b;
         print1(a, ", ")
        )
    }
    
  • PARI
    Vec(-(2*x^3+4*x^2+5*x+1)/((x-1)^2*(2*x^2-1)) + O(x^100)) \\ Colin Barker, Sep 26 2014
    
  • Sage
    [3*2^(n/2)*((7+5*sqrt(2)) + (-1)^n*(7-5*sqrt(2))) -(12*n+41) for n in (0..50)] # G. C. Greubel, Feb 17 2022

Formula

a(0) = 1, for n >= 1, a(n) = 6*A027383(n) + a(n-1).
a(n) = 2*a(n-1) +a(n-2) -4*a(n-3) +2*a(n-4). - Colin Barker, Sep 26 2014
G.f.: (1+5*x+4*x^2+2*x^3)/((1-x)^2*(1-2*x^2)). - Colin Barker, Sep 26 2014
a(n) = 3*2^(n/2)*((1+sqrt(2))^3 + (-1)^n*(1-sqrt(2))^3) -12*n - 41. - G. C. Greubel, Feb 18 2022

A351010 Numbers k such that the k-th composition in standard order is a concatenation of twins (x,x).

Original entry on oeis.org

0, 3, 10, 15, 36, 43, 58, 63, 136, 147, 170, 175, 228, 235, 250, 255, 528, 547, 586, 591, 676, 683, 698, 703, 904, 915, 938, 943, 996, 1003, 1018, 1023, 2080, 2115, 2186, 2191, 2340, 2347, 2362, 2367, 2696, 2707, 2730, 2735, 2788, 2795, 2810, 2815, 3600, 3619
Offset: 1

Views

Author

Gus Wiseman, Feb 01 2022

Keywords

Comments

The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The terms together with their binary expansions and the corresponding compositions begin:
    0:         0  ()
    3:        11  (1,1)
   10:      1010  (2,2)
   15:      1111  (1,1,1,1)
   36:    100100  (3,3)
   43:    101011  (2,2,1,1)
   58:    111010  (1,1,2,2)
   63:    111111  (1,1,1,1,1,1)
  136:  10001000  (4,4)
  147:  10010011  (3,3,1,1)
  170:  10101010  (2,2,2,2)
  175:  10101111  (2,2,1,1,1,1)
  228:  11100100  (1,1,3,3)
  235:  11101011  (1,1,2,2,1,1)
  250:  11111010  (1,1,1,1,2,2)
  255:  11111111  (1,1,1,1,1,1,1,1)
		

Crossrefs

The case of twins (binary weight 2) is A000120.
The Heinz numbers of these compositions are given by A000290.
All terms are evil numbers A001969.
Partitions of this type are counted by A035363, any length A351004.
These compositions are counted by A077957(n-2), see also A016116.
The strict case (distinct twins) is A351009, counted by A032020 with 0's.
The anti-run case is A351011, counted by A003242 interspersed with 0's.
A011782 counts integer compositions.
A085207/A085208 represent concatenation of standard compositions.
A333489 ranks anti-runs, complement A348612.
A345167/A350355/A350356 rank alternating compositions.
A351014 counts distinct runs in standard compositions.
Selected statistics of standard compositions:
- Length is A000120.
- Sum is A070939.
- Heinz number is A333219.
- Number of distinct parts is A334028.
Selected classes of standard compositions:
- Partitions are A114994, strict A333256.
- Multisets are A225620, strict A333255.
- Strict compositions are A233564.
- Constant compositions are A272919.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,100],And@@EvenQ/@Length/@Split[stc[#]]&]

A363493 Number T(n,k) of partitions of [n] having exactly k parity changes within their blocks, n>=0, 0<=k<=max(0,n-1), read by rows.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 4, 6, 4, 1, 10, 18, 17, 6, 1, 25, 61, 68, 38, 10, 1, 75, 210, 292, 202, 83, 14, 1, 225, 778, 1252, 1116, 576, 170, 22, 1, 780, 3008, 5670, 5928, 3899, 1490, 341, 30, 1, 2704, 12219, 26114, 32382, 25320, 12655, 3856, 678, 46, 1, 10556, 52268, 126073, 177666, 163695, 98282, 39230, 9418, 1319, 62, 1
Offset: 0

Views

Author

Alois P. Heinz, Jun 05 2023

Keywords

Examples

			T(4,0) = 4: 13|24, 13|2|4, 1|24|3, 1|2|3|4.
T(4,1) = 6: 124|3, 12|3|4, 134|2, 1|23|4, 14|2|3, 1|2|34.
T(4,2) = 4: 123|4, 12|34, 14|23, 1|234.
T(4,3) = 1: 1234.
T(5,2) = 17: 1235|4, 123|4|5, 1245|3, 12|34|5, 125|3|4, 12|3|45, 1345|2, 134|25, 14|235, 14|23|5, 15|234, 1|234|5, 1|23|45, 145|2|3, 14|25|3, 1|25|34, 1|2|345.
Triangle T(n,k) begins:
     1;
     1;
     1,     1;
     2,     2,     1;
     4,     6,     4,     1;
    10,    18,    17,     6,     1;
    25,    61,    68,    38,    10,     1;
    75,   210,   292,   202,    83,    14,    1;
   225,   778,  1252,  1116,   576,   170,   22,   1;
   780,  3008,  5670,  5928,  3899,  1490,  341,  30,  1;
  2704, 12219, 26114, 32382, 25320, 12655, 3856, 678, 46, 1;
  ...
		

Crossrefs

Columns k=0-2 give: A124419, A363511, A363588.
Row sums give A000110.
T(n+1,n) gives A000012.
T(n+2,n) gives A027383.
T(2n+1,n) gives A363495.

Programs

  • Maple
    b:= proc(n, x, y) option remember; `if`(n=0, 1,
         `if`(y=0, 0, expand(b(n-1, y-1, x+1)*y*z))+
            b(n-1, y, x)*x + b(n-1, y, x+1))
        end:
    T:= n-> (p-> seq(coeff(p, z, i), i=0..degree(p)))(b(n, 0$2)):
    seq(T(n), n=0..12);
  • Mathematica
    b[n_, x_, y_] := b[n, x, y] = If[n == 0, 1,
      If[y == 0, 0, Expand[b[n - 1, y - 1, x + 1]*y*z]] +
      b[n - 1, y, x]*x + b[n - 1, y, x + 1]];
    T[n_] := CoefficientList[b[n, 0, 0], z];
    Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Sep 05 2023, after Alois P. Heinz *)

Formula

Sum_{k=0..max(0,n-1)} k * T(n,k) = A363496(n).

A035491 Relevant part of deck in Guy's shuffling problem (A035485): row n of the table lists the first 2n "cards" (numbers) after the n-th shuffle.

Original entry on oeis.org

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

Views

Author

Keywords

Examples

			{}, {2, 1}, {3, 2, 4, 1}, {1, 3, 5, 2, 6, 4}, {6, 1, 4, 3, 7, 5, 8, 2}, ...
From _M. F. Hasler_, Aug 11 2022: (Start)
The first rows of the table are: (sequence = right part of the following table)
  row | first 2n cards (followed in the deck by 2n+1, 2n+2, ...)
------+---------------------------------------------------------
   0  |  -     (followed by 1, 2, 3, ...)
   1  |  2 1       (followed by 3, 4, 5, ...)
   2  |  3 2 4 1     (followed by 5, 6, 7, ...)
   3  |  1 3 5 2 6 4   (followed by 7, 8, 9, ...)
   4  |  6 1 4 3 7 5 8 2 (followed by 9, 10, 11, ...)
   5  |  5 6 8 1 2 4 9 3 10 7 (followed by 11, 12, 13, ...)
   6  |  9 5 3 6 10 8 7 1 11 2 12 4 (followed by 13, 14, 15, ...)
   7  |  1 9 11 5 2 3 12 6 4 10 13 8 14 7 (followed by 15, 16, 17, ...)
   8  |  4 1 10 9 13 11 8 5 14 2 7 3 15 12 16 6 (followed by 17, 18, 19, ...)
   (...)
The largest numbers in row n are 2n - k, located at column 2n + 1 - d(k) with d(k) = 2*A027383(k) = A347789(k+2) = 2, 4, 8, 12, 20, 28, ..., for k >= 0, d(k) <= 2n. (End)
		

References

  • D. Gale, Mathematical Entertainments: "Careful Card-Shuffling and Cutting Can Create Chaos," The Mathematical Intelligencer, vol. 14, no. 1, 1992, pages 54-56.
  • D. Gale, Tracking the Automatic Ant and Other Mathematical Explorations, A Collection of Mathematical Entertainments Columns from The Mathematical Intelligencer, Springer, 1998.

Crossrefs

Programs

  • Mathematica
    Flatten[NestList[riguy, {}, 12]] (* See A035490. *)
  • PARI
    A35491=Map(); d=[]; A035491_row(n)={while(#dM. F. Hasler, Aug 11 2022
    
  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        deck = []
        for n in count(1):
            deck += [2*n-1, 2*n]
            first, next = deck[:n], deck[n:2*n]
            deck[0:2*n:2], deck[1:2*n:2] = next, first
            yield from deck
    print(list(islice(agen(), 90))) # Michael S. Branicky, Aug 11 2022

Formula

T[n, 2*n + 1 - 2*A027383(k)] = 2n - k for all n and k >= 0, A027383(k) <= n. - M. F. Hasler, Aug 13 2022

A133629 a(1)=1, a(n) = a(n-1) + (p-1)*p^(n/2-1) if n is even, otherwise a(n) = a(n-1) + p^((n-1)/2), where p=5.

Original entry on oeis.org

1, 5, 10, 30, 55, 155, 280, 780, 1405, 3905, 7030, 19530, 35155, 97655, 175780, 488280, 878905, 2441405, 4394530, 12207030, 21972655, 61035155, 109863280, 305175780, 549316405, 1525878905, 2746582030, 7629394530, 13732910155, 38146972655, 68664550780
Offset: 1

Views

Author

Hieronymus Fischer, Sep 19 2007

Keywords

Comments

Partial sums of A133632.

Crossrefs

Sequences with similar recurrence rules: A027383 (p=2), A087503 (p=3), A133628 (p=4).
Related sequences: A132666, A132667, A132668, A132669.
Other related sequences for different p: A016116 (p=2), A038754 (p=3), A084221 (p=4), A133632 (p=5).

Programs

  • Maple
    a[0]:=0:a[1]:=1:for n from 2 to 100 do a[n]:=5*a[n-2]+5 od: seq(a[n], n=1..29); # Zerinvary Lajos, Mar 17 2008
  • PARI
    Vec(x*(1 + 4*x) / ((1 - x) * (1 - 5*x^2)) + O(x^40)) \\ Colin Barker, Nov 25 2016
    
  • Python
    def A133629(n): return (5+((n&1)<<2))*5**(n>>1)-5>>2 # Chai Wah Wu, Sep 02 2025

Formula

a(n) = Sum_{k=1..n} A133632(k).
The following formulas are given for a general natural parameter p > 1 (p=5 for this sequence).
G.f.: x(1+(p-1)x)/((1-px^2)(1-x)).
a(n) = (p/(p-1))*(p^(n/2)-1) if n is even, otherwise a(n)=(p/(p-1))*((2p-1)*p^((n-3)/2)-1).
a(n) = (p/(p-1))*(p^floor(n/2) + p^floor((n-1)/2) - p^floor((n-2)/2)-1).
a(n) = p^floor(n/2) + (p^floor((n+1)/2)-p)/(p-1).
a(n) = A132669(a(n+1)) - 1.
a(n) = A132669(a(n-1)+1) for n > 0.
A132669(a(n)) = a(n-1)+1 for n > 0.
From Colin Barker, Nov 25 2016: (Start)
a(n) = 5*(5^(n/2) - 1)/4 for n even.
a(n) = (9*5^(n/2-1/2) - 5)/4 for n odd.
a(n) = a(n-1) + 5*a(n-2) - 5*a(n-3) for n > 3.
G.f.: x*(1 + 4*x) / ((1 - x) * (1 - 5*x^2)).
(End)

A350352 Products of three or more distinct prime numbers.

Original entry on oeis.org

30, 42, 66, 70, 78, 102, 105, 110, 114, 130, 138, 154, 165, 170, 174, 182, 186, 190, 195, 210, 222, 230, 231, 238, 246, 255, 258, 266, 273, 282, 285, 286, 290, 310, 318, 322, 330, 345, 354, 357, 366, 370, 374, 385, 390, 399, 402, 406, 410, 418, 426, 429, 430
Offset: 1

Views

Author

Gus Wiseman, Jan 11 2022

Keywords

Comments

First differs from A336568 in lacking 420.

Examples

			The terms and their prime indices begin:
     30: {1,2,3}     182: {1,4,6}      285: {2,3,8}
     42: {1,2,4}     186: {1,2,11}     286: {1,5,6}
     66: {1,2,5}     190: {1,3,8}      290: {1,3,10}
     70: {1,3,4}     195: {2,3,6}      310: {1,3,11}
     78: {1,2,6}     210: {1,2,3,4}    318: {1,2,16}
    102: {1,2,7}     222: {1,2,12}     322: {1,4,9}
    105: {2,3,4}     230: {1,3,9}      330: {1,2,3,5}
    110: {1,3,5}     231: {2,4,5}      345: {2,3,9}
    114: {1,2,8}     238: {1,4,7}      354: {1,2,17}
    130: {1,3,6}     246: {1,2,13}     357: {2,4,7}
    138: {1,2,9}     255: {2,3,7}      366: {1,2,18}
    154: {1,4,5}     258: {1,2,14}     370: {1,3,12}
    165: {2,3,5}     266: {1,4,8}      374: {1,5,7}
    170: {1,3,7}     273: {2,4,6}      385: {3,4,5}
    174: {1,2,10}    282: {1,2,15}     390: {1,2,3,6}
		

Crossrefs

This is the squarefree case of A033942.
Including squarefree semiprimes gives A120944.
The squarefree complement consists of 1 and A167171.
These are the Heinz numbers of the partitions counted by A347548.
A000040 lists prime numbers (exactly 1 prime factor).
A005117 lists squarefree numbers.
A006881 lists squarefree numbers with exactly 2 prime factors.
A007304 lists squarefree numbers with exactly 3 prime factors.
A046386 lists squarefree numbers with exactly 4 prime factors.

Programs

  • Mathematica
    Select[Range[100],SquareFreeQ[#]&&PrimeOmega[#]>=3&]
  • PARI
    is(n,f=factor(n))=my(e=f[,2]); #e>2 && vecmax(e)==1 \\ Charles R Greathouse IV, Jul 08 2022
    
  • PARI
    list(lim)=my(v=List()); forsquarefree(n=30,lim\1, if(#n[2][,2]>2, listput(v,n[1]))); Vec(v) \\ Charles R Greathouse IV, Jul 08 2022
  • Python
    from sympy import factorint
    def ok(n): f = factorint(n, multiple=True); return len(f) == len(set(f)) > 2
    print([k for k in range(431) if ok(k)]) # Michael S. Branicky, Jan 14 2022
    
  • Python
    from math import isqrt, prod
    from sympy import primerange, integer_nthroot, primepi
    def A350352(n):
        def g(x,a,b,c,m): yield from (((d,) for d in enumerate(primerange(b+1,isqrt(x//c)+1),a+1)) if m==2 else (((a2,b2),)+d for a2,b2 in enumerate(primerange(b+1,integer_nthroot(x//c,m)[0]+1),a+1) for d in g(x,a2,b2,c*b2,m-1)))
        def f(x): return int(n+x-sum(sum(primepi(x//prod(c[1] for c in a))-a[-1][0] for a in g(x,0,1,1,i)) for i in range(3,x.bit_length())))
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        return bisection(f,n,n) # Chai Wah Wu, Sep 11 2024
    

A053599 Number of nonempty subsequences {s(k)} of 1..n such that the difference sequence is palindromic.

Original entry on oeis.org

1, 3, 7, 13, 23, 37, 59, 89, 135, 197, 291, 417, 607, 861, 1243, 1753, 2519, 3541, 5075, 7121, 10191, 14285, 20427, 28617, 40903, 57285, 81859, 114625, 163775, 229309, 327611, 458681, 655287, 917429, 1310643, 1834929, 2621359, 3669933, 5242795, 7339945
Offset: 1

Views

Author

John W. Layman, Jan 19 2000

Keywords

Comments

Equals (n-1)-th row sums of triangle A152202. - Gary W. Adamson, Nov 29 2008
a(n) is the number of positive integers < 2^n such that the binary representation of the odd part is palindromic; i.e., palindromic without the final 0's. - Andrew Woods, May 19 2012
a(n) is the number of ideals of the quotient ring Z_{2^n}[u]/ for indeterminate u. - Fatih Temiz, Oct 11 2017
Conjecture: let b(n) be the number of subsets S of {1,2,...,n} having more than one element such that (sum of least two elements of S) > max(S). Then b(0) = b(1) = 0 and b(n+2) = a(n+1) for n >= 0. - Clark Kimberling Sep 27 2022

Examples

			For n=4 the 13 sequences are 1,2,3,4,12,13,14,23,24,34,123,234,1234.
		

Crossrefs

Cf. A027383 (first differences), A016116 (second differences).
Cf. A152202.

Programs

Formula

a(1)=1, a(2)=3 and, for n > 2, a(n) = 2*a(n-2) + 2*n - 1.
G.f.: x*(1+x)/((1-x)^2*(1-2*x^2)). - Colin Barker, Mar 28 2012
a(n) = 5*2^((n+1)/2) - 2*n - 7 for odd n, 7*2^(n/2) - 2*n - 7 for even n. - Andrew Woods, May 19 2012

Extensions

Corrected by T. D. Noe, Nov 08 2006

A180918 'DPE(n,k)' triangle read by rows. DPE(n,k) is the number of k-double-palindromes of n up to cyclic equivalence.

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 0, 2, 1, 1, 0, 2, 2, 1, 1, 0, 3, 2, 3, 1, 1, 0, 3, 3, 3, 3, 1, 1, 0, 4, 3, 6, 3, 4, 1, 1, 0, 4, 4, 6, 6, 4, 4, 1, 1, 0, 5, 4, 10, 6, 10, 4, 5, 1, 1, 0, 5, 5, 10, 10, 10, 10, 5, 5, 1, 1, 0, 6, 5, 15, 10, 20, 10, 15, 5, 6, 1, 1, 0, 6, 6, 15, 15, 20, 20, 15, 15, 6, 6, 1, 1
Offset: 1

Views

Author

John P. McSorley, Sep 23 2010

Keywords

Comments

A k-composition of n is an ordered collection of k positive integers (parts) which sum to n. Two k-compositions of n are cyclically equivalent if one can be obtained from the other by a cyclic permutation of its parts.
A palindrome is a word which is the same when written backwards.
A k-double-palindrome of n is a k-composition of n which is the concatenation of two palindromes, PP'=P|P', where both |P|, |P'|>=1.
See sequence A180653. For example 1123532=11|23532 is a 7-double-palindrome of 17 since both 11 and 23532 are palindromes.
Let DPE(n,k) denote the number of k-double-palindromes of n up to cyclic equivalence.
This sequence is the 'DPE(n,k)' triangle read by rows.

Examples

			The triangle begins:
  0
  0 1
  0 1 1
  0 2 1 1
  0 2 2 1 1
  0 3 2 3 1 1
  0 3 3 3 3 1 1
  0 4 3 6 3 4 1 1
  0 4 4 6 6 4 4 1 1
  0 5 4 10 6 10 4 5 1 1
  ...
For example, row 8 is: 0 4 3 6 3 4 1 1.
We have DPE(8,3)=3 because there are 3 3-double-palindromes of 8 up to cyclic equivalence: {116, 611}, {224, 422}, and {233, 332}.
We have DPE(8,4)=6 because there are 6 4-double-palindromes of 8: up to cyclic equivalence: {1115, 5111, 1511, 1151}, {1214, 4121, 1412, 2141}, {1133, 3311}, {1313, 3131}, {1232, 2123, 3212, 2321}, and {2222}.
		

References

  • John P. McSorley: Counting k-compositions of n with palindromic and related structures. Preprint, 2010.

Crossrefs

Row sums are A027383(n-1).
If we remove the cyclic equivalence requirement, and just count k-double-palindromes of n, then we get sequence A180653.
If we replace the left hand column of 0's by 1's in the triangle above, we get the triangle 'RE(n, k)' where RE(n, k) is the number of k-reverses of n up to cyclic equivalence, see the McSorley reference above for more details and also sequence A119963.
See sequence A179181 for the triangle whose (n, k) term gives the number of k-palindromes (single-palindromes) of n up to cyclic equivalence.

Programs

  • PARI
    T(n, k) = {if(k<=1, 0, binomial((n-k%2)\2, k\2))} \\ Andrew Howroyd, Sep 27 2019

Formula

T(n, 1) = 0; T(n, k) = A119963(n,k) for k > 1.

Extensions

Terms a(56) and beyond from Andrew Howroyd, Sep 27 2019

A350140 Nonsquarefree numbers whose prime signature has at least one odd part other the first or last.

Original entry on oeis.org

60, 84, 120, 132, 140, 150, 156, 168, 204, 220, 228, 240, 260, 264, 270, 276, 280, 294, 300, 308, 312, 315, 336, 340, 348, 364, 372, 378, 380, 408, 420, 440, 444, 456, 460, 476, 480, 490, 492, 495, 516, 520, 528, 532, 540, 552, 560, 564, 572, 580, 585, 588
Offset: 1

Views

Author

Gus Wiseman, Dec 25 2021

Keywords

Comments

A number's prime signature (row n of A124010) is the sequence of positive exponents in its prime factorization.
Also Heinz numbers of non-weakly alternating non-strict integer partitions, where we define a sequence to be weakly alternating if it is alternately weakly increasing and weakly decreasing, starting with either. These partitions are counted by A349796. This sequence involves the somewhat degenerate case where no strict increases are allowed.

Examples

			The terms together with their Heinz partitions begin (A-E = 10-14):
     60: (3211)      276: (9211)      420: (43211)
     84: (4211)      280: (43111)     440: (53111)
    120: (32111)     294: (4421)      444: (C211)
    132: (5211)      300: (33211)     456: (82111)
    140: (4311)      308: (5411)      460: (9311)
    150: (3321)      312: (62111)     476: (7411)
    156: (6211)      315: (4322)      480: (3211111)
    168: (42111)     336: (421111)    490: (4431)
    204: (7211)      340: (7311)      492: (D211)
    220: (5311)      348: (A211)      495: (5322)
    228: (8211)      364: (6411)      516: (E211)
    240: (321111)    372: (B211)      520: (63111)
    260: (6311)      378: (42221)     528: (521111)
    264: (52111)     380: (8311)      532: (8411)
    270: (32221)     408: (72111)     540: (322211)
		

Crossrefs

Including all nonsquarefree numbers gives A013929, complement A005117.
Subsets include A088860 and A110286.
Signatures of this type are counted by A274230, complement A027383.
The strict instead of non-strict version is A336568, counted by A347548.
A version for compositions allowing strict is A349057, counted by A349053.
Allowing strict partitions gives A349794, counted by A349061.
These partitions are counted by A349796.
The complement in nonsquarefree partitions is A350137, counted by A349795.
A000041 = integer partitions, strict A000009.
A001250 = alternating permutations, ranked by A349051, complement A348615.
A003242 = Carlitz (anti-run) compositions.
A025047/A025048/A025049 = alternating compositions, ranked by A345167.
A056239 adds up prime indices, row sums of A112798, row lengths A001222.
A096441 = weakly alternating 0-appended partitions.
A124010 = prime signature, sorted A118914.
A345164 = alternating permutations of prime indices, complement A350251.
A345170 = partitions w/ an alternating permutation, ranked by A345172.
A349052/A129852/A129853 = weakly alternating compositions.
A349056 = weakly alternating permutations of prime indices.
A349058 = weakly alternating patterns, complement A350138.
A349060 = weakly alternating partitions, strong A349801.
A349798 = weakly but not strongly alternating perms of prime indices.

Programs

  • Mathematica
    Select[Range[300],!SquareFreeQ[#]&&PrimeNu[#]>1&& !And@@EvenQ/@Take[Last/@FactorInteger[#],{2,-2}]&]

Formula

Complement of A005117 in A349794.

A351011 Numbers k such that the k-th composition in standard order has even length and alternately equal and unequal parts, i.e., all run-lengths equal to 2.

Original entry on oeis.org

0, 3, 10, 36, 43, 58, 136, 147, 228, 235, 528, 547, 586, 676, 698, 904, 915, 2080, 2115, 2186, 2347, 2362, 2696, 2707, 2788, 2795, 3600, 3619, 3658, 3748, 3770, 8256, 8323, 8458, 8740, 8747, 8762, 9352, 9444, 9451, 10768, 10787, 10826, 11144, 11155, 14368
Offset: 1

Views

Author

Gus Wiseman, Feb 03 2022

Keywords

Comments

The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The terms together with their binary expansions and standard compositions begin:
    0:           0  ()
    3:          11  (1,1)
   10:        1010  (2,2)
   36:      100100  (3,3)
   43:      101011  (2,2,1,1)
   58:      111010  (1,1,2,2)
  136:    10001000  (4,4)
  147:    10010011  (3,3,1,1)
  228:    11100100  (1,1,3,3)
  235:    11101011  (1,1,2,2,1,1)
  528:  1000010000  (5,5)
  547:  1000100011  (4,4,1,1)
  586:  1001001010  (3,3,2,2)
  676:  1010100100  (2,2,3,3)
  698:  1010111010  (2,2,1,1,2,2)
  904:  1110001000  (1,1,4,4)
  915:  1110010011  (1,1,3,3,1,1)
		

Crossrefs

The case of twins (binary weight 2) is A000120.
All terms are evil numbers A001969.
These compositions are counted by A003242 interspersed with 0's.
Partitions of this type are counted by A035457, any length A351005.
The Heinz numbers of these compositions are A062503.
Taking singles instead of twins gives A333489, complement A348612.
This is the anti-run case of A351010.
The strict case (distinct twins) is A351009, counted by A077957(n-2).
A011782 counts compositions.
A085207/A085208 represent concatenation of standard compositions.
A345167 ranks alternating compositions, counted by A025047.
A350355 ranks up/down compositions, counted by A025048.
A350356 ranks down/up compositions, counted by A025049.
A351014 counts distinct runs in standard compositions.
Selected statistics of standard compositions:
- Length is A000120.
- Sum is A070939.
- Heinz number is A333219.
- Number of distinct parts is A334028.
Selected classes of standard compositions:
- Partitions are A114994, strict A333256.
- Multisets are A225620, strict A333255.
- Strict compositions are A233564.
- Constant compositions are A272919.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,1000],And@@(#==2&)/@Length/@Split[stc[#]]&]
Previous Showing 81-90 of 115 results. Next