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-6 of 6 results.

A192476 Monotonic ordering of set S generated by these rules: if x and y are in S then x^2 + y^2 is in S, and 1 is in S.

Original entry on oeis.org

1, 2, 5, 8, 26, 29, 50, 65, 68, 89, 128, 677, 680, 701, 740, 842, 845, 866, 905, 1352, 1517, 1682, 2501, 2504, 2525, 2564, 3176, 3341, 4226, 4229, 4250, 4289, 4625, 4628, 4649, 4688, 4901, 5000, 5066, 5300, 5465, 6725, 7124, 7922, 7925, 7946, 7985
Offset: 1

Views

Author

Clark Kimberling, Jul 01 2011

Keywords

Comments

Let N denote the positive integers, and suppose that f(x,y): N x N->N. Let "start" denote a subset of N, and let S be the set of numbers defined by these rules: if x and y are in S, then f(x,y) is in S, and "start" is a subset of S. The monotonic increasing ordering of S is a sequence:
A192476: f(x,y)=x^2+y^2, start={1}
A003586: f(x,y)=x*y, start={1,2,3}
A051037: f(x,y)=x*y, start={1,2,3,5}
A002473: f(x,y)=x*y, start={1,2,3,5,7}
A003592: f(x,y)=x*y, start={2,5}
A009293: f(x,y)=x*y+1, start={2}
A009388: f(x,y)=x*y-1, start={2}
A009299: f(x,y)=x*y+2, start={3}
A192518: f(x,y)=(x+1)(y+1), start={2}
A192519: f(x,y)=floor(x*y/2), start={3}
A192520: f(x,y)=floor(x*y/2), start={5}
A192521: f(x,y)=floor((x+1)(y+1)/2), start={2}
A192522: f(x,y)=floor((x-1)(y-1)/2), start={5}
A192523: f(x,y)=2x*y-x-y, start={2}
A192525: f(x,y)=2x*y-x-y, start={3}
A192524: f(x,y)=4x*y-x-y, start={1}
A192528: f(x,y)=5x*y-x-y, start={1}
A192529: f(x,y)=3x*y-x-y, start={2}
A192531: f(x,y)=3x*y-2x-2y, start={2}
A192533: f(x,y)=x^2+y^2-x*y, start={2}
A192535: f(x,y)=x^2+y^2+x*y, start={1}
A192536: f(x,y)=x^2+y^2-floor(x*y/2), start={1}
A192537: f(x,y)=x^2+y^2-x*y/2, start={2}
A192539: f(x,y)=2x*y+floor(x*y/2), start={1}

Examples

			1^2+1^2=2, 1^2+2^2=5, 2^2+2^2=8, 1^2+5^2=26.
		

Crossrefs

Programs

  • Haskell
    import Data.Set (singleton, deleteFindMin, insert)
    a192476 n = a192476_list !! (n-1)
    a192476_list = f [1] (singleton 1) where
       f xs s =
         m : f xs' (foldl (flip insert) s' (map (+ m^2) (map (^ 2) xs')))
         where xs' = m : xs
               (m,s') = deleteFindMin s
    -- Reinhard Zumkeller, Aug 15 2011
  • Mathematica
    start = {1}; f[x_, y_] :=  x^2 + y^2  (* start is a subset of t, and if x,y are in t then f(x,y) is in t. *)
    b[z_] :=  Block[{w = z}, Select[Union[Flatten[AppendTo[w, Table[f[w[[i]], w[[j]]], {i, 1, Length[w]}, {j, 1, i}]]]], # < 30000 &]];
    t = FixedPoint[b, start] (* A192476 *)
    Differences[t]
    (* based on program by Robert G. Wilson v at A009293 *)

A009299 If a, b in sequence, so is a*b+2.

Original entry on oeis.org

2, 6, 14, 30, 38, 62, 78, 86, 126, 158, 174, 182, 198, 230, 254, 318, 350, 366, 374, 398, 422, 462, 470, 510, 518, 534, 638, 702, 734, 750, 758, 798, 846, 870, 902, 926, 942, 950, 1022, 1038, 1046, 1070, 1094, 1142, 1190, 1206, 1278, 1382, 1406, 1446, 1470, 1502
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    import Data.Set (singleton, deleteFindMin, insert)
    a009299 n = a009299_list !! (n-1)
    a009299_list = f [2] (singleton 2) where
       f xs s = m : f xs' (foldl (flip insert) s' (map ((+ 2) . (* m)) xs'))
         where xs' = m : xs
               (m,s') = deleteFindMin s
    -- Reinhard Zumkeller, Aug 15 2011

A009388 If a, b in sequence, so is a*b-1.

Original entry on oeis.org

2, 3, 5, 8, 9, 14, 15, 17, 23, 24, 26, 27, 29, 33, 39, 41, 44, 45, 47, 50, 51, 53, 57, 63, 65, 68, 69, 71, 74, 77, 80, 81, 84, 86, 87, 89, 93, 98, 99, 101, 105, 111, 113, 114, 116, 119, 122, 125, 129, 131, 134, 135, 137, 140, 141, 144, 147, 149, 152, 153, 158, 159, 161, 164
Offset: 1

Views

Author

Keywords

Comments

All terms are congruent to 0 or 2 mod 3. It follows that no three consecutive integers are in the sequence. - Franklin T. Adams-Watters, Aug 31 2016, conjectured by David W. Wilson.

Crossrefs

Cf. A009293. This is superset of A005659 - 1.

Programs

  • Haskell
    import Data.Set (singleton, deleteFindMin, insert)
    a009388 n = a009388_list !! (n-1)
    a009388_list = f [2] (singleton 2) where
       f xs s = m : f xs' (foldl (flip insert) s' (map (pred . (* m)) xs'))
         where xs' = m : xs
               (m,s') = deleteFindMin s
    -- Reinhard Zumkeller, Aug 15 2011
  • Mathematica
    f[l_] := Block[{k = l}, Select[ Union[ Flatten[ AppendTo[k, Table[ k[[i]]*k[[j]] - 1, {i, 1, Length[k]}, {j, 1, i}]]]], # < 170 &]]; NestList[f, {2}, 6][[ -1]] (* Robert G. Wilson v, May 23 2004 *)

A180337 Numbers which cannot be expressed as a sum 1 + p1 + p1*p2 + p1*p2*p3 + ... for some collection of primes {p1, p2, p3, ...}.

Original entry on oeis.org

2, 5, 11, 23, 26, 47, 56, 95, 116, 122, 236, 254, 518, 530, 1082, 2210
Offset: 1

Views

Author

Jack W Grahl, Aug 28 2010

Keywords

Comments

I conjecture, but have not been able to prove, that this sequence is finite with only the terms given above. In that case it can be constructed by taking a1=2, and adjoining all numbers aj*ak + 1, where aj and ak are two prime members of the sequence.
Any number which can be expressed as p*q + 1, where p is prime and q does not belong to the sequence, does not belong to the sequence either.

Examples

			8 is not a member of the sequence since it is equal to 1 + 7.
9 is not a member of the sequence since it can be written 1 + 2 + 2*3.
10 is not a member of the sequence since it is equal to 1 + 3 + 3*2.
11 is a member of the sequence. If 11 could be written in this form, then p1 must divide 10. We would have 11 = 1 + p1(1 + p2 + ...), which would imply that 5 is not a member of the sequence if p1 = 2, or vice versa. Since both 2 nor 5 are members, so is 11.
		

Crossrefs

All terms given above belong to A009293.

Programs

  • Maple
    q:= proc(n) option remember; is(n=1 or ormap(p->
          q((n-1)/p), numtheory[factorset](n-1)))
        end:
    remove(q, [$1..3000])[];  # Alois P. Heinz, Jul 24 2018
  • Mathematica
    q[1] = True; q[2] = False;
    q[n_] := q[n] = AnyTrue[FactorInteger[n-1][[All, 1]], q[(n-1)/#]&];
    Select[Range[3000], !q[#]&] (* Jean-François Alcover, Nov 11 2020, after Alois P. Heinz *)
  • Perl
    #!/usr/bin/perl $max = 10; if (defined($ARGV[0])) { $max = $ARGV[0]; } $primes{1} = 0; $list{1} = 1; $list{2} = 0; print "2, "; foreach $k (2..$max){ $p = 1; $l = 0; foreach $j (1..$k) { if ($primes{$j}){ if (($k % $j) == 0){ $p = 0; if ($list{$k / $j}){ $l = 1; } } } } $primes{$k} = $p; $list{$k + 1} = $l || $p; if (!$list{$k + 1}){ $t = $k + 1; print "$t, " } }

Formula

A317240(a(n)) = 0. - Alois P. Heinz, Jul 24 2018

A093906 Start with {2} and close under the operations XY and XY+1; sequence gives complete list of numbers that do not appear.

Original entry on oeis.org

1, 3, 6, 7, 12, 13, 14, 15, 24, 27, 28, 29, 30, 31, 48, 49, 54, 57, 58, 59, 60, 61, 62, 63, 97, 98, 108, 109, 114, 117, 118, 119, 120, 123, 124, 127, 194, 197, 217, 218, 219, 228, 229, 237, 238, 239, 240, 241, 246, 247, 248, 249, 389, 394, 434, 439, 457, 458, 479, 482, 492, 493, 497, 498, 499, 788, 789, 878, 879, 917, 959, 984, 985, 986, 994, 997, 998, 1579, 1757, 1758, 1759, 1968, 1971, 1988, 1994, 1997, 3514, 3517, 3518, 3989, 7028, 7034, 7037, 7978, 14074, 28148
Offset: 1

Views

Author

Keywords

Comments

If we start with {2} and close under the operations XY-1 and XY+1, we get the complement of A014574 (midpoints of twin primes), except for the absence of 1.

Crossrefs

Cf. A009388 and A009293.

Extensions

Corrected by Don Reble, May 25 2004

A180432 Start with 3. If a, b in sequence, so is ab+1.

Original entry on oeis.org

3, 10, 31, 94, 101, 283, 304, 311, 850, 913, 934, 941, 962, 1011, 2551, 2740, 2803, 2824, 2831, 2887, 2915, 3034, 3041, 3111, 3132, 7654, 8221, 8410, 8473, 8494, 8501, 8662, 8746, 8774, 8837, 9103, 9124, 9131, 9334, 9341, 9397, 9411, 9425, 9495, 9621
Offset: 1

Views

Author

Robert G. Wilson v, Sep 04 2010

Keywords

Comments

The difference between any two terms is == 0 (mod 7).

Crossrefs

Cf. A009293.

Programs

  • Mathematica
    f[s_List] := Select[ Union@ Join[s, Union[1 + Times @@@ Subsets[ Join[s, s], {2}]]], # < 10000 &]; Nest[f, {3}, 8]
Showing 1-6 of 6 results.