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

A352535 Numbers m such that A257588(m) = 0.

Original entry on oeis.org

0, 11, 22, 33, 44, 55, 66, 77, 88, 99, 110, 220, 330, 354, 440, 453, 550, 660, 770, 880, 990, 1001, 1100, 1111, 1122, 1133, 1144, 1155, 1166, 1177, 1188, 1199, 1221, 1331, 1441, 1487, 1551, 1575, 1661, 1771, 1784, 1881, 1991, 2002, 2112, 2200, 2211, 2222, 2233, 2244, 2255, 2266, 2277
Offset: 1

Views

Author

Bernard Schott, Mar 20 2022

Keywords

Comments

If m is a term, 10*m is also a term; so, terms with no trailing zeros are all primitive terms.
Palindromes with even number of digits (A056524) are all terms.

Examples

			354 is a term since 3^2 - 5^2 + 4^2 = 0 (with Pythagorean triple (3,4,5)).
1487 is a term since 1^2 - 4^2 + 8^2 - 7^2 = 0.
		

Crossrefs

Subsequences: A056524, A333440, A338754.

Programs

  • Mathematica
    f[n_] := Abs @ Total[(d = IntegerDigits[n]^2) * (-1)^Range[Length[d]]]; Select[Range[0, 2300], f[#] == 0 &] (* Amiram Eldar, Mar 20 2022 *)
  • Python
    from itertools import count, islice
    def A352535_gen(startvalue=0): # generator of terms >= startvalue
        return filter(lambda m: not sum(int(d)**2*(-1 if i % 2 else 1) for i, d in enumerate(str(m))), count(max(startvalue,0)))
    A352535_list = list(islice(A352535_gen(),30)) # Chai Wah Wu, Mar 24 2022

Formula

A257588(a(n)) = 0.

A333441 Numbers where each binary digit can be paired with a digit of the same value at another position so that two pairs can be nested but cannot otherwise overlap.

Original entry on oeis.org

0, 3, 9, 12, 15, 33, 36, 39, 45, 48, 51, 54, 57, 60, 63, 129, 132, 135, 141, 144, 147, 150, 153, 156, 159, 165, 177, 180, 183, 189, 192, 195, 198, 201, 204, 207, 210, 216, 219, 222, 225, 228, 231, 237, 240, 243, 246, 249, 252, 255, 513, 516, 519, 525, 528, 531
Offset: 1

Views

Author

Rémy Sigrist, Mar 21 2020

Keywords

Comments

The term 0 is included by convention (we consider here that it has no digit).
This sequence is a binary variant of A333440.
Every term belong to A059012.
This sequence has connections with A014486; in both sequences digits are balanced in some way.

Examples

			The first terms, alongside their binary representation with a possible pairing, are:
  n   a(n)  bin(a(n))
  --  ----  ------------
   1     0  0
   2     3  (11)
   3     9  (1(00)1)
   4    12  (11)(00)
   5    15  (11)(11)
   6    33  (1(00)(00)1)
   7    36  (1(00)1)(00)
   8    39  (1(00)1)(11)
   9    45  (1(0(11)0)1)
  10    48  (11)(00)(00)
  11    51  (11)(00)(11)
  12    54  (11)(0(11)0)
  13    57  (11)(1(00)1)
  14    60  (11)(11)(00)
  15    63  (11)(11)(11)
		

Crossrefs

Programs

  • PARI
    is(n, base=2) = { my (u=0, s=0); while (n, my (d=n%base); if (u && s%base==d, u--; s\=base, u++; s=s*base+d); n\=base); u==0 }
Showing 1-2 of 2 results.