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.

User: Eric Fox

Eric Fox's wiki page.

Eric Fox has authored 10 sequences.

A355851 The difference between the indices of the two most recent instances of a(n-1), not including a(n-1) itself, or 0 if not enough such instances exist.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 1, 9, 0, 2, 2, 4, 0, 8, 0, 4, 0, 2, 1, 2, 7, 0, 2, 2, 3, 0, 5, 0, 4, 4, 13, 0, 2, 1, 12, 0, 4, 1, 15, 0, 4, 7, 0, 4, 4, 3, 0, 3, 21, 0, 4, 1, 4, 6, 0, 3, 2, 9, 0, 5, 0, 4, 2, 24, 0, 2, 6, 0, 4, 9, 50, 0, 3, 8, 0, 4, 7, 21, 0, 3, 17
Offset: 1

Author

Eric Fox, Jul 19 2022

Keywords

Comments

This is similar to Van Eck's sequence: A181391.

Examples

			Say you have 0, 0, 0, 1, 0, 1, 0, 2, 0, 2, 0, 2, 2, ?
The previous term is a 2, and the distance between the pair of most recent 2s before that is 2, hence ? = 2.
		

Crossrefs

Cf. A181391.

A354856 a(1) = 1, a(n) = the number of times a(n-1) appears among the first n-2 terms.

Original entry on oeis.org

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

Author

Eric Fox, Jun 09 2022

Keywords

Examples

			a(10) = 3 because a(9) = 1 and 3 other 1s appear before that.
		

Crossrefs

Programs

  • PARI
    lista(nn) = my(va=vector(nn)); va[1] = 1; for (n=2, nn, my(vb = vector(n-2, k, va[k])); va[n] = #select(x->(x==va[n-1]), vb);); va; \\ Michel Marcus, Jun 13 2022
  • Python
    from collections import Counter
    from itertools import count, islice
    def agen(): # generator of terms
        anprev, an, inventory = None, 1, Counter()
        for n in count(2):
            yield an
            anprev, an = an, inventory[an]
            inventory[anprev] += 1
    print(list(islice(agen(), 80))) # Michael S. Branicky, Jun 09 2022
    

Formula

a(4n+1..4n+4) = 1, n+1, 0, n+1 for n >= 1. - Michael S. Branicky, Jun 12 2022

Extensions

a(54) and beyond from Michael S. Branicky, Jun 12 2022

A353219 Positive integers which cannot be expressed as the sum of three or fewer squares, no more than two of which are greater than 1.

Original entry on oeis.org

7, 12, 15, 22, 23, 24, 28, 31, 39, 43, 44, 47, 48, 55, 56, 57, 60, 63, 67, 70, 71, 76, 77, 78, 79, 84, 87, 88, 92, 93, 94, 95, 96, 103, 108, 111, 112, 115, 119, 120, 124, 127, 132, 133, 134, 135, 139, 140, 141, 142, 143, 151, 152, 155, 156, 159, 166, 167, 168, 172, 175
Offset: 1

Author

Eric Fox, Apr 30 2022

Keywords

Comments

These are the numbers which cannot be a clue in a Tasquare puzzle.
Tasquare also known as Tasukuea.

Examples

			A 9 clue can be satisfied in at least one way:
  OOO  OO OO
  OOO  OO9OO
  OOO9   O
So, 9 is not a term in this sequence.
		

Crossrefs

Complement of A353202.
Cf. A022544.

Programs

  • Maple
    q:= proc(n) local i; for i to isqrt(n) do if ormap(issqr,
          [n-i^2, n-i^2-1]) then return false fi od: true
        end:
    select(q, [$1..175])[];  # Alois P. Heinz, Apr 30 2022
  • Mathematica
    q[n_] := Module[{i}, For[i = 1, i <= Sqrt[n], i++, If[AnyTrue[ {n-i^2, n-i^2-1}, IntegerQ@Sqrt[#]&], Return[False]]]; True];
    Select[Range[175], q] (* Jean-François Alcover, Dec 28 2022, after Alois P. Heinz *)

A353202 Positive integers which can be expressed as the sum of three or fewer squares, no more than two of which are greater than 1.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 13, 14, 16, 17, 18, 19, 20, 21, 25, 26, 27, 29, 30, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 45, 46, 49, 50, 51, 52, 53, 54, 58, 59, 61, 62, 64, 65, 66, 68, 69, 72, 73, 74, 75, 80, 81, 82, 83, 85, 86, 89, 90, 91, 97, 98, 99, 100
Offset: 1

Author

Eric Fox, Apr 30 2022

Keywords

Comments

These are the numbers which can be a clue in a Tasquare puzzle.
Tasquare also known as Tasukuea.

Examples

			A 9 clue can be satisfied in multiple ways:
  OOO  OO OO
  OOO  OO9OO
  OOO9   O
		

Crossrefs

Complement of A353219.
Cf. A001481.

Programs

  • Maple
    q:= proc(n) local i; for i to isqrt(n) do if ormap(issqr,
          [n-i^2, n-i^2-1]) then return true fi od: false
        end:
    select(q, [$1..100])[];  # Alois P. Heinz, Apr 30 2022
  • Mathematica
    q[n_] := Module[{i}, For[i = 1, i <= Sqrt[n], i++, If[AnyTrue[ {n-i^2, n-i^2-1}, IntegerQ@Sqrt[#]&], Return[True]]]; False];
    Select[Range[100], q] (* Jean-François Alcover, Dec 28 2022, after Alois P. Heinz *)

A353199 a(1)=a(2)=1. a(n) = the sum of the indices of the terms, from among the first (n-2) terms of the sequence, which divide a(n-1).

Original entry on oeis.org

1, 1, 1, 3, 6, 10, 6, 15, 10, 12, 22, 6, 22, 17, 6, 34, 20, 21, 10, 21, 28, 6, 49, 6, 71, 6, 95, 6, 121, 6, 149, 6, 179, 6, 211, 6, 245, 29, 6, 281, 6, 320, 57, 10, 40, 101, 6, 361, 6, 408, 497, 31, 6, 457, 6, 510, 681, 10, 84, 634, 6, 565, 6, 626, 6, 689, 6, 754, 44, 30, 965
Offset: 1

Author

Eric Fox, Apr 30 2022

Keywords

Examples

			a(10) = 12. Of the terms before that, a(1), a(2), a(3), a(4), a(5), and a(7) divide 12. Hence, a(11) = 1+2+3+4+5+7 = 22.
		

Crossrefs

Cf. A124063.

Programs

  • Mathematica
    a[1] = a[2] = 1; a[n_] := a[n] = Total[Select[Range[n - 2], Divisible[a[n - 1], a[#]] &]]; Array[a, 100] (* Amiram Eldar, Apr 30 2022 *)
  • PARI
    first(n) = { n = max(n, 2); res = List([1,1]); for(i = 3, n, v = Vec(select(x->res[#res]%x == 0, res, 1))[^-1]; listput(res, vecsum(v)) ); res } \\ David A. Corneth, Apr 30 2022

A333133 7-Kaprekar numbers.

Original entry on oeis.org

1, 627615, 4444444, 4927941, 5072059, 5555556, 9372385, 9999999
Offset: 1

Author

Eric Fox, Mar 09 2020

Keywords

Comments

No n-Kaprekar number k can have more than n digits because then the number to the left of the plus sign would have more digits than k itself, meaning the sum will always be greater than k.

Examples

			627615 is in this sequence because inserting a + before the 7th digit from the right of 627615^2 = 393900588225 yields 39390 + 0588225, which equals 627615 (the starting number).
		

A332261 Numbers that yield a prime whenever a '4' is inserted between any two digits.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 19, 21, 37, 39, 43, 49, 51, 57, 61, 63, 67, 73, 91, 97, 109, 129, 147, 153, 159, 171, 187, 199, 211, 223, 237, 241, 247, 259, 267, 333, 349, 357, 363, 409, 421, 423, 441, 447, 457, 463, 493, 517, 537, 541, 543, 549, 571, 579, 583, 627, 649, 681
Offset: 1

Author

Eric Fox, Feb 08 2020

Keywords

Comments

For single-digit terms, the condition is voidly satisfied: nothing can be inserted.

Examples

			10281 is in this sequence because 1(4)0281, 10(4)281, 102(4)81, and 1028(4)1 are all prime.
		

Crossrefs

Programs

  • Magma
    a:=[]; for k in [1..700] do s:=0; v:=Reverse(Intseq(k)); for i in [1..#v-1] do vv:=v[1..i] cat [4] cat v[i+1..#v]; p:=Seqint(Reverse(vv)); if not IsPrime(p) then break; else s:=s+1; end if; end for;  if s eq #v-1 then Append(~a,k); end if; end for; [0] cat a; // Marius A. Burtea, Feb 09 2020

A332240 Palindromes that are the sum of a number and the sum of its digits.

Original entry on oeis.org

0, 2, 4, 6, 8, 11, 22, 33, 44, 55, 66, 77, 88, 99, 101, 111, 131, 141, 151, 161, 171, 181, 191, 202, 212, 232, 242, 252, 262, 272, 282, 292, 303, 313, 333, 343, 353, 363, 373, 383, 393, 404, 414, 434, 444, 454, 464, 474, 484, 494, 505, 515, 535, 545, 555, 565, 575
Offset: 1

Author

Eric Fox, Feb 07 2020

Keywords

Examples

			196 + 1 + 9 + 6 = 212, so 212 is in this sequence.
		

Crossrefs

Intersection of A002113 and A176995.

Programs

  • Magma
    pal:=func; [k:k in [0..600]| pal(k) and exists(m){s:s in [0..k]| s+&+Intseq(s) eq k}]; // Marius A. Burtea, Feb 08 2020
  • Mathematica
    palQ[n_] := Block[{d = IntegerDigits[n]}, Reverse[d] == d]; Select[ Union[(# + Plus @@ IntegerDigits@#) & /@ Range[0, 600]], # <= 600 && palQ[#] &] (* Giovanni Resta, Feb 07 2020 *)

Formula

a(n) in { A062028(A229545(i)) : i >= 1 }. - Amiram Eldar, Feb 12 2020

Extensions

More terms from Giovanni Resta, Feb 07 2020

A330729 Numbers k that are divisible by all integers less than or equal to the cube root of k.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 30, 36, 42, 48, 54, 60, 72, 84, 96, 108, 120, 180, 240, 300, 420
Offset: 1

Author

Eric Fox, Dec 28 2019

Keywords

Examples

			42 appears because the cube root of 42 is approximately 3.48 and 42 is divisible by 3, 2, and 1 (all positive integers less than 3.48).
		

Crossrefs

Cf. A003102.

Programs

  • Magma
    [k: k in [1..500]|forall{m:m in [1..Floor(k^(1/3))]|k mod m eq 0}]; // Marius A. Burtea, Dec 31 2019
    
  • Mathematica
    Select[Range[1000], Divisible[#, LCM @@ Range @ Floor @ Surd[#, 3]] &] (* Amiram Eldar, Dec 28 2019 *)
  • PARI
    is(k) = {my(m=sqrtnint(k, 3)); sum(i=1, m, Mod(k, i)==0) == m; } \\ Jinyuan Wang, Dec 31 2019

A323593 Position on a Dvorak typewriter (or computer) keyboard where the n-th letter of the alphabet can be found.

Original entry on oeis.org

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

Author

Eric Fox, Aug 30 2019

Keywords

Examples

			a(8)=14 because the 8th letter of the alphabet resides on the 14th key of a Dvorak keyboard.
		

Crossrefs

Cf. A087622.