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.

Showing 1-7 of 7 results.

A229829 Numbers coprime to 15.

Original entry on oeis.org

1, 2, 4, 7, 8, 11, 13, 14, 16, 17, 19, 22, 23, 26, 28, 29, 31, 32, 34, 37, 38, 41, 43, 44, 46, 47, 49, 52, 53, 56, 58, 59, 61, 62, 64, 67, 68, 71, 73, 74, 76, 77, 79, 82, 83, 86, 88, 89, 91, 92, 94, 97, 98, 101, 103, 104, 106, 107, 109, 112, 113, 116, 118, 119
Offset: 1

Views

Author

Gary Detlefs, Oct 01 2013

Keywords

Comments

A001651 INTERSECT A047201.
a(n) - 15*floor((n-1)/8) - 2*((n-1) mod 8) has period 8, repeating [1,0,0,1,0,1,1,0].
Numbers whose odd part is 7-rough: products of terms of A007775 and powers of 2 (terms of A000079). - Peter Munn, Aug 04 2020
The asymptotic density of this sequence is 8/15. - Amiram Eldar, Oct 18 2020

Crossrefs

Lists of numbers coprime to other semiprimes: A007310 (6), A045572 (10), A162699 (14), A160545 (21), A235933 (35).
Subsequence of: A001651, A047201.
Subsequences: A000079, A007775.

Programs

  • Magma
    [n: n in [1..120] | IsOne(GCD(n,15))]; // Bruno Berselli, Oct 01 2013
    
  • Maple
    for n from 1 to 500 do if n mod 3<>0 and n mod 5<>0 then print(n) fi od
  • Mathematica
    Select[Range[120], GCD[#, 15] == 1 &] (* or *) t = 70; CoefficientList[Series[(1 + x + 2 x^2 + 3 x^3 + x^4 + 3 x^5 + 2 x^6 + x^7 + x^8)/((1 - x)^2 (1 + x) (1 + x^2) (1 + x^4)) , {x, 0, t}], x] (* Bruno Berselli, Oct 01 2013 *)
    Select[Range[120],CoprimeQ[#,15]&] (* Harvey P. Dale, Oct 31 2013 *)
  • Sage
    [i for i in range(120) if gcd(i, 15) == 1] # Bruno Berselli, Oct 01 2013

Formula

a(n+8) = a(n) + 15.
a(n) = 15*floor((n-1)/8) +2*f(n) +floor(2*phi*(f(n+1)+2)) -2*floor(phi*(f(n+1)+2)), where f(n) = (n-1) mod 8 and phi=(1+sqrt(5))/2.
a(n) = 15*floor((n-1)/8) +2*f(n) +floor((2*f(n)+5)/5) -floor((f(n)+2)/3), where f(n) = (n-1) mod 8.
From Bruno Berselli, Oct 01 2013: (Start)
G.f.: x*(1 +x +2*x^2 +3*x^3 +x^4 +3*x^5 +2*x^6 +x^7 +x^8) / ((1-x)^2*(1+x)*(1+x^2)*(1+x^4)). -
a(n) = a(n-1) +a(n-8) -a(n-9) for n>9. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = 2*sqrt(7 + sqrt(5) - sqrt(6*(5 + sqrt(5))))*Pi/15. - Amiram Eldar, Dec 13 2021

A025795 Expansion of 1/((1-x^2)*(1-x^3)*(1-x^5)).

Original entry on oeis.org

1, 0, 1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 6, 7, 7, 8, 9, 9, 11, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 21, 23, 24, 25, 27, 28, 29, 31, 32, 34, 35, 37, 38, 40, 42, 43, 45, 47, 48, 51, 52, 54, 56, 58, 60, 62, 64, 66, 68, 71, 72, 75, 77, 79, 82, 84, 86, 89, 91, 94, 96, 99, 101, 104
Offset: 0

Views

Author

Keywords

Comments

a(n) is the number of ways to pay n dollars with coins of two, three and five dollars. E.g., a(0)=1 because there is one way to pay: with no coin; a(1)=0 no possibility; a(2)=1 (2=1*2); a(3)=1 (3=1*3); a(4)=1 (4=2*2) a(5)=2 (5=3+2=1*5) ... - Richard Choulet, Jan 20 2008
a(n) is the number of partitions of n into parts 2, 3, and 5. See the preceding comment by R. Choulet. - Wolfdieter Lang, Mar 15 2012

Examples

			G.f. = 1 + x^2 + x^3 + x^4 + 2*x^5 + 2*x^6 + 2*x^7 + 3*x^8 + 3*x^9 + 4*x^10 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := Quotient[n^2 + 10 n + 1 - 13 Mod[n, 2], 60] + 1; (* Michael Somos, Nov 17 2017 *)
  • PARI
    {a(n) = (n^2 + 10*n + 1 - n%2 * 13) \60 + 1} /* Michael Somos, Feb 05 2008 */

Formula

G.f.: 1/((1-x^2)*(1-x^3)*(1-x^5)).
Let [b(1); b(2); ...; b(p)] denote a periodic sequence: e.g., [0; 1] defines the sequence c such that c(0)=c(2)=...=c(2*k)=0 and c(1)=c(3)=...=c(2*k+1)=1. Then a(n)=0.25*[0; 1] - (1/3)*[1; 0; 0] + (1/5)*[0; 1; 1; 0; 3] + ((n+1)*(n+2)/60) + (7*(n+1)/60). - Richard Choulet, Jan 20 2008
If ||A|| is the nearest number to A (A not a half-integer) we also have a(n) = ||((n+1)*(n+9)/60) + (1/5)[0; 1; 1; 0; 3]. - Richard Choulet, Jan 20 2008
a(n) = 77/360 + 7*(n+1)/60 + (n+2)*(n+1)/60 + (-1)^n/8 - (2/9)*cos(2*(n+2)*Pi/3) + (4/(5*sqrt(5)+25))*cos(2*n*Pi/5) - (4/(5*sqrt(5)-25))*cos(4*n*Pi/5). - Richard Choulet, Jan 20 2008
Euler transform of length 5 sequence [0, 1, 1, 0, 1]. - Michael Somos, Feb 05 2008
a(n) = a(-10-n) for all n in Z. - Michael Somos, Feb 25 2008
a(n) - a(n-2) = A008676(n). a(n) - a(n-5) = A103221(n) = A008615(n+2). A078495(n) = 2^(a(n-7) + a(n-9)) * 3^a(n-8) for all n in Z. - Michael Somos, Nov 17 2017, corrected Jun 23 2021
a(n)-a(n-3) = A008616(n). - R. J. Mathar, Jun 23 2021
a(n) = floor((n^2 + 10*n + 6*(9+(-1)^n))/60). - Hoang Xuan Thanh, Jun 15 2025

A357489 Numbers k such that the k-th composition in standard order is a triple (w,x,y) such that 2w = 3x + 4y.

Original entry on oeis.org

133, 1034, 4113, 8212, 32802, 65576, 131137, 262212, 524368, 1048706, 2097288, 4194464, 4194561, 8388868, 16777488, 33554752, 33554946, 67109384, 134218272, 134218753, 268436096, 268436484, 536871952, 1073742912, 1073743874, 2147484928, 2147485704, 4294969376
Offset: 1

Views

Author

Gus Wiseman, Nov 02 2022

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n. 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 the corresponding standard compositions begin:
     133: (5,2,1)
    1034: (7,2,2)
    4113: (8,4,1)
    8212: (9,2,3)
   32802: (10,4,2)
   65576: (11,2,4)
  131137: (11,6,1)
  262212: (12,4,3)
  524368: (13,2,5)
		

Crossrefs

See link for sequences related to standard compositions.
By sum, these triples appear to be counted by A008676.
The unordered version is A358102, counted by A357849.
A011782 counts compositions.
A066099 lists the standard compositions.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,10000],Length[stc[#]]==3&&2*stc[#][[1]]==3*stc[#][[2]]+4*stc[#][[3]]&]
  • Python
    from itertools import count, islice
    def A357489_gen(): # generator of terms
        for n in count(1):
            yield from sorted((1<0 and 6*(n-x)>m and m%6==0)
    A357489_list = list(islice(A357489_gen(),40)) # Chai Wah Wu, Nov 02 2022

Extensions

a(10)-a(28) from Chai Wah Wu, Nov 02 2022

A357849 Number of integer partitions (w,x,y) summing to n such that 2w = 3x + 4y.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 3, 2, 3, 2, 2, 3, 2, 3, 3, 2, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3
Offset: 0

Views

Author

Gus Wiseman, Nov 02 2022

Keywords

Examples

			The partitions for n = 34, 64, 89, 119, 144:
  (21,10,3)  (39,22,3)  (54,32,3)   (72,44,3)   (87,54,3)
             (40,16,8)  (55,26,8)   (73,38,8)   (88,48,8)
                        (56,20,13)  (74,32,13)  (89,42,13)
                                    (75,26,18)  (90,36,18)
                                                (91,30,23)
		

Crossrefs

Partitions are counted by A000041, strict A000009.
The ordered version appears to be A008676, ranked by A357489.
These partitions are ranked by A358102.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n,{3}],2*#[[1]]==3*#[[2]]+4*#[[3]]&]],{n,0,100}]
  • Python
    def A357849(n): return sum(1 for y in range(1,n-1) if (m:=2*n-6*y)>=5*y and 5*(n-y)>=2*m and m%5==0) # Chai Wah Wu, Nov 02 2022

A246720 Number A(n,k) of partitions of n into parts of the k-th list of distinct parts in the order given by A246688; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

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

Views

Author

Alois P. Heinz, Sep 02 2014

Keywords

Comments

The first lists of distinct parts in the order given by A246688 are: 0:[], 1:[1], 2:[2], 3:[1,2], 4:[3], 5:[1,3], 6:[4], 7:[1,4], 8:[2,3], 9:[5], 10:[1,2,3], 11:[1,5], 12:[2,4], 13:[6], 14:[1,2,4], 15:[1,6], 16:[2,5], 17:[3,4], 18:[7], 19:[1,2,5], 20:[1,3,4], ... .

Examples

			Square array A(n,k) begins:
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  1, 1, 1, 1,  1, ...
  0, 1, 0, 1, 0, 1, 0, 1, 0, 0,  1, 1, 0, 0,  1, ...
  0, 1, 1, 2, 0, 1, 0, 1, 1, 0,  2, 1, 1, 0,  2, ...
  0, 1, 0, 2, 1, 2, 0, 1, 1, 0,  3, 1, 0, 0,  2, ...
  0, 1, 1, 3, 0, 2, 1, 2, 1, 0,  4, 1, 2, 0,  4, ...
  0, 1, 0, 3, 0, 2, 0, 2, 1, 1,  5, 2, 0, 0,  4, ...
  0, 1, 1, 4, 1, 3, 0, 2, 2, 0,  7, 2, 2, 1,  6, ...
  0, 1, 0, 4, 0, 3, 0, 2, 1, 0,  8, 2, 0, 0,  6, ...
  0, 1, 1, 5, 0, 3, 1, 3, 2, 0, 10, 2, 3, 0,  9, ...
  0, 1, 0, 5, 1, 4, 0, 3, 2, 0, 12, 2, 0, 0,  9, ...
  0, 1, 1, 6, 0, 4, 0, 3, 2, 1, 14, 3, 3, 0, 12, ...
		

Crossrefs

Main diagonal gives A246721.
Cf. A246688, A246690 (the same for compositions).

Programs

  • Maple
    b:= proc(n, i) b(n, i):= `if`(n=0, [[]], `if`(i>n, [],
          [map(x->[i, x[]], b(n-i, i+1))[], b(n, i+1)[]]))
        end:
    f:= proc() local i, l; i, l:=0, [];
          proc(n) while n>=nops(l)
            do l:=[l[], b(i, 1)[]]; i:=i+1 od; l[n+1]
          end
        end():
    g:= proc(n, l) option remember; `if`(n=0, 1, `if`(l=[], 0,
          add(g(n-l[-1]*j, subsop(-1=NULL, l)), j=0..n/l[-1])))
        end:
    A:= (n, k)-> g(n, f(k)):
    seq(seq(A(n, d-n), n=0..d), d=0..16);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, {{}}, If[i > n, {}, Join[Prepend[#, i]& /@ b[n - i, i + 1], b[n, i + 1]]]];
    f = Module[{i = 0, l = {}}, Function[n, While[ n >= Length[l], l = Join[l, b[i, 1]]; i++ ]; l[[n + 1]]]];
    g[n_, l_] := g[n, l] = If[n == 0, 1, If[l == {}, 0, Sum[g[n - l[[-1]] j, ReplacePart[l, -1 -> Nothing]], {j, 0, n/l[[-1]]}]]];
    A[n_, k_] := g[n, f[k]];
    Table[Table[A[n, d - n], {n, 0, d}], {d, 0, 16}] // Flatten (* Jean-François Alcover, Dec 07 2020, after Alois P. Heinz *)

A358102 Numbers of the form prime(w)*prime(x)*prime(y) with w >= x >= y such that 2w = 3x + 4y.

Original entry on oeis.org

66, 153, 266, 609, 806, 1295, 1599, 1634, 2107, 3021, 3055, 3422, 5254, 5369, 5795, 5829, 7138, 8769, 9443, 9581, 10585, 10706, 12337, 12513, 13298, 16465, 16511, 16849, 17013, 18602, 21983, 22145, 23241, 23542, 26159, 29014, 29607, 29945, 30943, 32623, 32809
Offset: 1

Views

Author

Gus Wiseman, Nov 02 2022

Keywords

Comments

Also Heinz numbers of integer partitions (w,x,y) summing to n such that 2w = 3x + 4y, where the Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).

Examples

			The terms together with their prime indices begin:
     66: {1,2,5}
    153: {2,2,7}
    266: {1,4,8}
    609: {2,4,10}
    806: {1,6,11}
   1295: {3,4,12}
   1599: {2,6,13}
   1634: {1,8,14}
   2107: {4,4,14}
   3021: {2,8,16}
   3055: {3,6,15}
   3422: {1,10,17}
   5254: {1,12,20}
   5369: {4,6,17}
   5795: {3,8,18}
   5829: {2,10,19}
   7138: {1,14,23}
   8769: {2,12,22}
		

Crossrefs

The ordered version is A357489, apparently counted by A008676.
These partitions are counted by A357849.
A000040 lists the primes.
A000041 counts partitions, strict A000009.
A003963 multiplies prime indices.
A056239 adds up prime indices.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[1000],PrimeOmega[#]==3&&2*primeMS[#][[-1]]==3*primeMS[#][[-2]]+4*primeMS[#][[-3]]&]

A165640 Number of distinct multisets of n integers, each of which is -2, +1, or +3, such that the sum of the members of each multiset is 3.

Original entry on oeis.org

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

Views

Author

John W. Layman, Sep 23 2009

Keywords

Examples

			For n=6, the multisets {-2,1,1,1,1,1}, {-2,-2,-2,3,3,3}, and no others, sum to 3, so a(6)=2.
		

Crossrefs

Cf. A008676.

Formula

Conjecture: a(n) = floor(4*(n+4)/5) - floor(2*(n+4)/3).
Empirical g.f.: -x*(x^7-x^4-x^2-1) / ((x-1)^2*(x^2+x+1)*(x^4+x^3+x^2+x+1)). - Colin Barker, Nov 06 2014
Showing 1-7 of 7 results.