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

A030157 Even numbers k such that in k^2 the parity of digits alternates.

Original entry on oeis.org

0, 2, 4, 6, 16, 26, 36, 74, 84, 96, 204, 264, 296, 384, 404, 426, 574, 584, 606, 726, 736, 764, 874, 884, 964, 1464, 1584, 1596, 1704, 2036, 2074, 2084, 2184, 2916, 2926, 2964, 3306, 3536, 3764, 3816, 4116, 4264, 4306, 5684, 5726, 5736, 5874
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A030158 (the squares).

Programs

  • Maple
    alp:= proc(n) local L,d;
    L:= convert(n,base,10);
    d:= nops(L);
    if d::even then L:= L + map(op, [[0,1]$(d/2)]) else L:= L + map(op, [[0,1]$((d-1)/2),[0]]) fi;
    nops(convert(L mod 2, set))=1
    end proc:
    select(t -> alp(t^2), [seq(i,i=0..10000,2)]); # Robert Israel, Aug 15 2018
  • Mathematica
    id[n_]:=IntegerDigits[n^2]; t={}; Do[If[Length[id[n]]==1, AppendTo[t, n], If[Union[Abs[Differences[Boole/@EvenQ[id[n]]]]]=={1}, AppendTo[t, n]]], {n, 0, 6000, 2}]; t (* Vincenzo Librandi, Aug 15 2018 *)
    Join[{0,2},Select[Range[0,6000,2],Union[Abs[Differences[Boole[OddQ[ IntegerDigits[ #^2]]]]]] == {1}&]] (* Harvey P. Dale, Sep 11 2024 *)

Extensions

Offset changed by Robert Israel, Aug 15 2018

A030153 Numbers k such that in k and k^2 the parity of digits alternates.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 9, 16, 23, 27, 36, 69, 74, 81, 96, 127, 181, 187, 296, 874, 2327, 2369, 2723, 2727, 2763, 3816, 4589, 5874, 6563, 6589, 6727, 8323, 10181, 12723, 18163, 18587, 21236, 21274, 29236, 29274, 30127, 43296, 52361, 78163, 87616
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    altQ[n_] := n < 10 || Union[Total /@ Partition[ Mod[ IntegerDigits@n, 2], 2, 1]] == {1}; Select[ Range[0, 10^5], altQ[#] && altQ[#^2] &] (* Giovanni Resta, Aug 16 2018 *)

A030156 Odd squares in which parity of digits alternates.

Original entry on oeis.org

1, 9, 25, 49, 81, 121, 169, 361, 529, 729, 961, 4761, 6561, 12321, 12769, 14161, 16129, 18769, 32761, 34969, 56169, 72361, 74529, 76729, 78961, 96721, 212521, 214369, 290521, 436921, 452929, 458329, 474721, 670761, 690561, 1038361
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    altQ[n_] := n < 10 || Union[Total /@ Partition[ Mod[ IntegerDigits@n, 2], 2, 1]] == {1}; Select[ Range[1, 2000, 2]^2, altQ[#] &] (* Giovanni Resta, Aug 16 2018 *)

Extensions

Offset changed by Giovanni Resta, Aug 16 2018

A030155 Odd n such that in n^2 the parity of digits alternates.

Original entry on oeis.org

1, 3, 5, 7, 9, 11, 13, 19, 23, 27, 31, 69, 81, 111, 113, 119, 127, 137, 181, 187, 237, 269, 273, 277, 281, 311, 461, 463, 539, 661, 673, 677, 689, 819, 831, 1019, 1027, 1111, 1113, 1119, 1127, 1137, 1269, 1277, 1287, 1361, 1369, 1377, 1863, 1969
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    altQ[n_] := n < 10 || Union[Total /@ Partition[ Mod[ IntegerDigits@n, 2], 2, 1]] == {1}; Select[ Range[1, 2000, 2], altQ[#^2] &] (* Giovanni Resta, Aug 16 2018 *)

Extensions

Offset changed by Giovanni Resta, Aug 16 2018
Showing 1-4 of 4 results.