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-10 of 17 results. Next

A066657 Numerators of rational numbers produced in order by A066720(j)/A066720(i) for i >= 1, 1 <= j

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 3, 1, 2, 3, 5, 1, 1, 3, 5, 7, 1, 2, 3, 5, 7, 8, 1, 2, 3, 5, 7, 8, 11, 1, 2, 3, 5, 7, 8, 11, 13, 1, 1, 1, 5, 7, 4, 11, 13, 17, 1, 2, 3, 5, 7, 8, 11, 13, 17, 18, 1, 2, 3, 5, 7, 8, 11, 13, 17, 18, 19, 1, 2, 3, 5, 7, 8, 11, 13, 17, 18, 19, 23, 1, 2, 3, 5, 7
Offset: 0

Views

Author

N. J. A. Sloane, Jan 18 2002

Keywords

Comments

Does every rational number in range (0,1) appear?
a(0) = 1 by convention.

Examples

			Sequence of rationals begins 1, 1/2, 1/3, 2/3, 1/5, 2/5, 3/5, 1/7, 2/7, 3/7, 5/7, 1/8, 1/4, 3/8, 5/8, 7/8, 1/11, 2/11, ...
		

Crossrefs

Cf. A066658 (denominators), A066720.

Programs

  • Haskell
    import Data.List (inits)
    import Data.Ratio ((%), numerator)
    a066657 n = a066657_list !! n
    a066657_list = map numerator
       (1 : (concat $ tail $ zipWith (\u vs -> map (% u) vs)
                                     a066720_list (inits a066720_list)))
    -- Reinhard Zumkeller, Nov 19 2013
  • Mathematica
    nmax = 14;
    b[1] = 1; F = {1};
    For[n = 2, n <= nmax, n++,
    For[k = b[n-1]+1, True, k++, Fk = Join[{k^2}, Table[b[i]*k, {i, 1, n-1}]] // Union; If[Fk~Intersection~F == {}, b[n] = k; F = F~Union~Fk; Break[]]]];
    Join[{1}, Table[b[k]/b[n], {n, 1, nmax}, {k, 1, n-1}]] // Flatten // Numerator (* Jean-François Alcover, Aug 23 2022, after _Robert Israel in A066720 *)

A066658 Denominators of rational numbers produced in order by A066720(j)/A066720(i) for i >= 1, 1 <= j

Original entry on oeis.org

1, 2, 3, 3, 5, 5, 5, 7, 7, 7, 7, 8, 4, 8, 8, 8, 11, 11, 11, 11, 11, 11, 13, 13, 13, 13, 13, 13, 13, 17, 17, 17, 17, 17, 17, 17, 17, 18, 9, 6, 18, 18, 9, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 29, 29
Offset: 0

Views

Author

N. J. A. Sloane, Jan 18 2002

Keywords

Comments

Does every rational number in range (0,1) appear?
a(0) = 1 by convention.

Examples

			Sequence of rationals begins 1, 1/2, 1/3, 2/3, 1/5, 2/5, 3/5, 1/7, 2/7, 3/7, 5/7, 1/8, 1/4, 3/8, 5/8, 7/8, 1/11, 2/11, ...
		

Crossrefs

Cf. A066657 (numerators), A066720.

Programs

  • Haskell
    import Data.List (inits)
    import Data.Ratio ((%), denominator)
    a066658 n = a066658_list !! n
    a066658_list = map denominator
       (1 : (concat $ tail $ zipWith (\u vs -> map (% u) vs)
                                     a066720_list (inits a066720_list)))
    -- Reinhard Zumkeller, Nov 19 2013
  • Mathematica
    nmax = 14;
    b[1] = 1; F = {1};
    For[n = 2, n <= nmax, n++,
    For[k = b[n - 1] + 1, True, k++, Fk = Join[{k^2}, Table[b[i]*k, {i, 1, n - 1}]] // Union; If[Fk~Intersection~F == {}, b[n] = k; F = F~Union~Fk; Break[]]]];
    Join[{1}, Table[b[k]/b[n], {n, 1, nmax}, {k, 1, n - 1}]] // Flatten // Denominator (* Jean-François Alcover, Aug 23 2022, after Robert Israel in A066720 *)

A066721 Nonprimes in A066720.

Original entry on oeis.org

1, 8, 18, 50, 60, 81, 98, 105, 128, 242, 264, 308, 338, 416, 495, 520, 546, 560, 578, 625, 663, 675, 684, 864, 935, 952, 1029, 1058, 1083, 1224, 1242, 1254, 1425, 1430, 1682, 1729, 1748, 1771, 1827, 1922, 2436, 2691, 2697, 2720, 2738, 2755, 2790, 2975
Offset: 1

Views

Author

N. J. A. Sloane, Jan 15 2002

Keywords

Comments

2*p^2 is in the sequence for all primes except those in A066775.

Crossrefs

Programs

  • Haskell
    a066721 n = a066721_list !! (n-1)
    a066721_list = filter ((== 0) . a010051') a066720_list
    -- Reinhard Zumkeller, Nov 19 2013
  • Mathematica
    s={1}; xok := Module[ {}, For[ i=1, i<=n, i++, For[ j=1; k=Length[ dl=Divisors[ s[[ i ]]x ]], j<=k, j++; k--, If[ MemberQ[ s, dl[[ j ] ]]&&MemberQ[ s, dl[[ k ] ]], Return[ False ]] ]]; True ]; For[ n=1, True, n++, If[ !PrimeQ[ s[[ n ] ]], Print[ s[[ n ]] ]]; For[ x=s[[ n ]]+1, True, x++, If[ xok, AppendTo[ s, x ]; Break[ ]] ]]
  • PARI
    {a066721(m) = local(a,rat,n,s,new,b,i,k,j); a=[]; rat=Set([]); n=0; s=0; while(sKlaus Brockhaus, Feb 23 2002
    

Extensions

More terms from Dean Hickerson, Klaus Brockhaus and David Applegate, Jan 15 2002

A066848 Consider sequence of fractions A066657/A066658 produced by ratios of terms in A066720; let m = smallest integer such that all fractions 1/n, 2/n, ..., (n-1)/n have appeared when we reach A066720(m) = k; sequence gives values of k; set a(n) = -1 if some fraction i/n never appears.

Original entry on oeis.org

1, 2, 3, 2436, 520, 60, 308, 2436, 15867, 61800, 8096, 55620, 77077, 20216, 51675, 2296992, 21607, 15867, 185820, 481680, 140805, 226644, 145866, 1568928, 1076000, 187772, 5596587, 1831956, 715778, 3540060, 836535, 2296992, 3088008, 1129514, 7096775, 1995048, 2018646, 3159168, 13019136, 15293320, 6936667, 11250624, 6877463, 20475136, 3380040, 3986360, 1052424, 17566608, 5152350, 1076000, 3824694, 8897564, 2987239, 17600004, 24056230, 89537336, 23397531, 2791424, 5393780, 19344660, 5306268, 8679008, 126415359, 30486400, 29303235
Offset: 1

Views

Author

N. J. A. Sloane, Jan 21 2002

Keywords

Examples

			3/4 does not occur until we reach A066720(401) = 2436 and then we see A066720(320)/A066720(401) = 1827/2436 = 3/4. Therefore a(4) = 2436.
		

Crossrefs

Cf. A066720, A066657, A066658. A066849 gives values of m.

Extensions

Corrected by John W. Layman, Feb 05 2002
Greatly extended by David Applegate, Feb 13 2002

A066849 Consider sequence of fractions A066657/A066658 produced by ratios of terms in A066720; let m = smallest integer such that all fractions 1/n, 2/n, ..., (n-1)/n have appeared when we reach A066720(m) = k; sequence gives values of m; set a(n) = -1 if some fraction i/n never appears.

Original entry on oeis.org

1, 2, 3, 401, 113, 22, 75, 401, 1986, 6547, 1110, 5949, 7952, 2445, 5578, 172617, 2590, 1986, 17471, 41341, 13631, 20900, 14063, 121563, 86009, 17648, 392866, 140171, 59293, 257162, 68370, 172617, 226693, 89942, 489653, 151601, 153287, 231508, 860521, 999664, 479352, 751180, 475540, 1312350, 246470, 287004, 84285, 1137690, 363942, 86009, 276267, 603972, 219888, 1139722, 1525515, 5227193, 1486480, 206546, 379708, 1244626, 374003, 590152, 7230480, 1903679, 1834403
Offset: 1

Views

Author

N. J. A. Sloane, Jan 21 2002

Keywords

Examples

			3/4 does not occur until we reach A066720(401) = 2436 and then we see A066720(320)/A066720(401) = 1827/2436 = 3/4. Therefore a(4) = 401.
		

Crossrefs

Cf. A066720, A066657, A066658. A066848 gives values of k.

Extensions

Corrected by John W. Layman, Feb 05 2002
Greatly extended by David Applegate, Feb 13 2002

A079851 Duplicate of A066720.

Original entry on oeis.org

1, 2, 3, 5, 7, 8, 11, 13, 17, 18, 19, 23, 29, 31, 37, 41, 43, 47, 50, 53, 59, 60, 61, 67, 71, 73, 79, 81, 83, 89, 97, 98, 101, 103, 105, 107, 109, 113, 127, 128, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 242
Offset: 1

Views

Author

Keywords

A011185 A B_2 sequence: a(n) = least value such that sequence increases and pairwise sums of distinct elements are all distinct.

Original entry on oeis.org

1, 2, 3, 5, 8, 13, 21, 30, 39, 53, 74, 95, 128, 152, 182, 212, 258, 316, 374, 413, 476, 531, 546, 608, 717, 798, 862, 965, 1060, 1161, 1307, 1386, 1435, 1556, 1722, 1834, 1934, 2058, 2261, 2497, 2699, 2874, 3061, 3197, 3332, 3629, 3712, 3868, 4140, 4447, 4640
Offset: 1

Views

Author

Keywords

Comments

a(n) = least positive integer > a(n-1) and not equal to a(i)+a(j)-a(k) for distinct i and j with 1 <= i,j,k <= n-1. [Comment corrected by Jean-Paul Delahaye, Oct 02 2020.]

Crossrefs

Programs

  • Python
    from itertools import islice
    def agen(): # generator of terms
        aset, sset, k = set(), set(), 0
        while True:
            k += 1
            while any(k+an in sset for an in aset): k += 1
            yield k; sset.update(k+an for an in aset); aset.add(k)
    print(list(islice(agen(), 51))) # Michael S. Branicky, Feb 05 2023

Formula

a(n) = A010672(n-1)+1.

A067992 a(0)=1 and, for n > 0, a(n) is the smallest positive integer such that the ratios min(a(k)/a(k-1), a(k-1)/a(k)) for 0 < k <= n are all distinct.

Original entry on oeis.org

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

Views

Author

John W. Layman, Feb 06 2002

Keywords

Comments

Every positive rational number appears exactly once as the ratio of adjacent terms (in either order). Conjecture: adjacent terms are always relatively prime. - Franklin T. Adams-Watters, Sep 13 2006

Examples

			The sequence of all rational numbers between 0 and 1 obtained by taking ratios of sorted consecutive terms begins: 1/2, 2/3, 1/3, 1/4, 3/4, 3/5, 1/5, 1/6, 5/6, 2/5, 2/7, 1/7, 1/8, 3/8, 3/7, 4/7, 4/5, 5/7, 6/7. - _Gus Wiseman_, Aug 30 2018
		

Crossrefs

See A066720 for a somewhat similar sequence.

Programs

  • Mathematica
    Nest[Function[seq,Append[seq,NestWhile[#+1&,1,MemberQ[Divide@@@Sort/@Partition[seq,2,1],Min[Last[seq]/#,#/Last[seq]]]&]]],{1},100] (* Gus Wiseman, Aug 30 2018 *)
  • PARI
    seen = Set([]); other(p) = for (v=1, oo, my (r = min(v,p)/max(v,p)); if (!set search(seen, r), seen = set union(seen, Set([r])); return (v)))
    for (n=0, 88, v = if (n==0, 1, other(v)); print1 (v ", ")) \\ Rémy Sigrist, Aug 07 2017

Formula

a(6)=3, since 1/4 and 2/4 = 1/2 have already occurred as ratios of adjacent terms.

A337655 a(1)=1; thereafter, a(n) is the smallest number such that both the addition and multiplication tables for (a(1),...,a(n)) contain n*(n+1)/2 different entries (the maximum possible).

Original entry on oeis.org

1, 2, 5, 7, 15, 22, 31, 50, 68, 90, 101, 124, 163, 188, 215, 253, 322, 358, 455, 486, 527, 631, 702, 780, 838, 920, 1030, 1062, 1197, 1289, 1420, 1500, 1689, 1765, 1886, 2114, 2353, 2410, 2570, 2686, 2857, 3063, 3207, 3477, 3616, 3845, 3951, 4150, 4480, 4595, 4746, 5030, 5286, 5698, 5999, 6497, 6624, 6938, 7219, 7661, 7838, 8469, 8665, 9198, 9351, 9667, 9966
Offset: 1

Views

Author

Jean-Paul Delahaye, Sep 30 2020

Keywords

Comments

If one specifies that not only are there n(n+1)/2 distinct numbers in the addition and multiplication tables, but that all n(n+1) numbers are distinct, then the sequence is A337946 - David A. Corneth, Oct 02 2020

Crossrefs

See A337659 and A337660 (for the addition table), and A337661 and A337662 (for the multiplication table).
For similar sequences that focus just on the addition or multiplication tables, see A005282 and A066720.
Cf. also A337946.

Programs

  • Mathematica
    terms=67;a[1]=b[1]=1;a1=b1={1};Do[k=a[n-1]+1;While[a2=Union@Join[{2k},Array[a@#+k&,n-1]];b2=Union@Join[{k^2},Array[b@#*k&,n-1]];Intersection[a2,a1]!={}||Intersection[b2,b1]!={},k++];a[n]=b[n]=k;a1=Union[a1,a2];b1=Union[b1,b2],{n,2,terms}];Array[a,terms] (* Giorgos Kalogeropoulos, Nov 15 2021 *)

A066724 a(1) = 1, a(2) = 2; for n > 1, a(n) is the least integer > a(n-1) such that the products a(i)*a(j) for 1 <= i < j <= n are all distinct.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 9, 11, 13, 16, 17, 19, 23, 25, 29, 30, 31, 37, 41, 43, 47, 49, 53, 59, 61, 67, 71, 73, 79, 81, 83, 84, 89, 97, 101, 103, 107, 109, 113, 121, 127, 128, 131, 137, 139, 149, 151, 154, 157, 163, 167, 169, 173, 179, 180, 181, 191, 193, 197, 199, 211
Offset: 1

Views

Author

Robert E. Sawyer (rs.1(AT)mindspring.com), Jan 18 2002

Keywords

Comments

The first 15 terms are the same as A026477; the first 13 terms are the same as A026416.
Contains all primes. - Ivan Neretin, Mar 02 2016

Examples

			a(7) is not 10 because we already have 10 = 2*5. Of course all primes appear. a(14) is not 24 because if it were there would be a repeat among the terms a(i)*a(j) for 1 <= i < j <= 14, namely 3*16 = 2*24.
		

Crossrefs

Programs

  • Mathematica
    f[l_List] := Block[{k = 1, p = Times @@@ Subsets[l, {2}]},While[Intersection[p, l*k] != {}, k++ ];Append[l, k]];Nest[f, {1, 2}, 62] (* Ray Chandler, Feb 12 2007 *)
Showing 1-10 of 17 results. Next