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

A297644 Pentagonal numbers (A000326) in which parity of digits alternates.

Original entry on oeis.org

1, 5, 12, 70, 92, 145, 210, 852, 925, 2147, 2501, 3290, 3432, 3876, 4187, 4347, 6305, 6501, 12105, 12927, 25676, 27270, 27676, 45850, 58707, 69230, 69876, 70525, 76501, 78547, 98945, 101270, 123410, 161212, 270725, 349692, 367290, 567030, 707610, 709672
Offset: 1

Views

Author

Colin Barker, Jan 02 2018

Keywords

Comments

Intersection of A000326 and A030141. - Felix Fröhlich, Jan 03 2018

Examples

			3876 is in the sequence because 3, 8, 7 and 6 have odd and even parity alternately.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local L;
      if n < 10 then return true fi;
      L:= convert(n, base, 10) mod 2;
      not has(L[2..-1]-L[1..-2], 0)
    end proc:
    select(filter, [seq(n*(3*n-1)/2, n=1..1000)]); # Robert Israel, Jan 03 2018
  • PARI
    is_alt(n) = m=n; e=n%10; n\=10; while(n>0, f=n%10; if(e%2==f%2, return, e=f; n\=10)); return(m)
    select(is_alt, vector(1000, n, (3*n^2-n)/2))

A297645 Hexagonal numbers (A000384) in which parity of digits alternates.

Original entry on oeis.org

1, 6, 45, 276, 325, 496, 561, 630, 703, 2145, 2701, 6903, 8385, 10585, 14365, 18721, 25878, 38503, 47278, 74305, 89676, 90525, 107416, 109278, 147696, 149878, 210925, 254541, 303810, 345696, 349030, 383250, 454581, 527878, 561270, 674541, 705078, 709836
Offset: 1

Views

Author

Colin Barker, Jan 02 2018

Keywords

Comments

Intersection of A000384 and A030141. - Felix Fröhlich, Jan 03 2018

Examples

			6903 is in the sequence because 6, 9, 0 and 3 have even and odd parity alternately.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local L;
      if n < 10 then return true fi;
      L:= convert(n, base, 10) mod 2;
      not has(L[2..-1]-L[1..-2], 0)
    end proc:
    select(filter, [seq(n*(2*n-1),n=1..10^4)]); # Robert Israel, Jan 05 2018
  • PARI
    is_alt(n) = m=n; e=n%10; n\=10; while(n>0, f=n%10; if(e%2==f%2, return, e=f; n\=10)); return(m)
    select(is_alt, vector(1000, n, (4*n^2-2*n)/2))

A297646 Heptagonal numbers (A000566) in which parity of digits alternates.

Original entry on oeis.org

1, 7, 18, 34, 81, 189, 616, 783, 874, 3010, 4141, 4347, 5452, 6943, 8323, 12145, 14707, 18361, 52345, 69472, 74563, 78943, 96727, 129618, 147258, 163456, 214183, 232105, 250747, 258727, 270109, 276723, 278389, 307476, 309232, 381616, 389470, 436183, 450925
Offset: 1

Views

Author

Colin Barker, Jan 02 2018

Keywords

Comments

Intersection of A000566 and A030141. - Felix Fröhlich, Jan 03 2018

Examples

			6943 is in the sequence because 6, 9, 4 and 3 have even and odd parity alternately.
		

Crossrefs

Programs

  • Mathematica
    Join[{1,7},Select[PolygonalNumber[7,Range[1000]],Union[Abs[Differences[ Boole[ OddQ[ IntegerDigits[ #]]]]]] =={1}&]] (* Harvey P. Dale, Jul 14 2022 *)
  • PARI
    is_alt(n) = m=n; e=n%10; n\=10; while(n>0, f=n%10; if(e%2==f%2, return, e=f; n\=10)); return(m)
    select(is_alt, vector(1000, n, (5*n^2-3*n)/2))

A297647 Octagonal numbers (A000567) in which parity of digits alternates.

Original entry on oeis.org

1, 8, 21, 65, 96, 341, 3816, 4961, 8321, 8965, 9296, 10325, 12545, 14145, 14981, 16725, 18565, 23056, 27456, 36741, 63656, 65416, 103416, 105656, 169456, 181056, 210145, 216545, 232965, 236321, 256961, 412181, 430165, 434721, 569416, 614721, 658945, 698901
Offset: 1

Views

Author

Colin Barker, Jan 02 2018

Keywords

Comments

Intersection of A000567 and A030141. - Felix Fröhlich, Jan 03 2018

Examples

			8321 is in the sequence because 8, 3, 2 and 1 have even and odd parity alternately.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local L;
      if n < 10 then return true fi;
      L:= convert(n,base,10) mod 2;
      not has(L[2..-1]-L[1..-2],0)
    end proc:
    select(filter, [seq(n*(3*n-2),n=1..1000)]); # Robert Israel, Jan 03 2018
  • PARI
    is_alt(n) = m=n; e=n%10; n\=10; while(n>0, f=n%10; if(e%2==f%2, return, e=f; n\=10)); return(m)
    select(is_alt, vector(1000, n, (6*n^2-4*n)/2))

A068883 Smallest n-digit triangular numbers with property that digits alternate in parity, or 0 if no such number exists.

Original entry on oeis.org

1, 10, 105, 1830, 10585, 107416, 1038961, 10109256, 101410161, 1014503490, 10143650961, 101072103210, 1012143638925, 10101274165450, 101014143472945, 1010363290981278, 10101078125834905, 101012169252147076, 1010125816103490141
Offset: 1

Views

Author

Amarnath Murthy, Mar 19 2002

Keywords

Examples

			a(4) = 1830 is a term as 1, 8, 3 and 0 have odd and even parity alternately.
		

Crossrefs

Extensions

a(7)-a(18) from Donovan Johnson, Mar 14 2010
a(19) from Donovan Johnson, Mar 11 2011

A068884 Largest n-digit triangular number with property that digits alternate in parity, or 0 if no such number exists.

Original entry on oeis.org

6, 78, 903, 9870, 96141, 941878, 9850141, 98947278, 985036305, 9892547470, 98585094741, 989436909450, 9898947258903, 98969892923278, 989872901298945, 9898987276765450, 98985850965876105, 989898183850729896, 9898969072503098503
Offset: 1

Views

Author

Amarnath Murthy, Mar 19 2002

Keywords

Examples

			a(4) = 9870 is a term as 9, 8, 7 and 0 have odd and even parity alternately.
		

Crossrefs

Extensions

a(6)-a(19) from Donovan Johnson, Mar 11 2011

A068889 Triangular numbers with property that digits alternate in parity individually as well as in concatenation with previous terms.

Original entry on oeis.org

1, 6, 10, 36, 78, 105, 210, 325, 496, 561, 630, 703, 2145, 2701, 6105, 6903, 8385, 23436, 30381, 41616, 50721, 67896, 70125, 81810, 90525, 210925, 214185, 230181, 232903, 254541, 258121, 290703, 414505, 454581, 490545, 498501, 634501, 674541, 810901, 852165
Offset: 1

Views

Author

Amarnath Murthy, Mar 20 2002

Keywords

Crossrefs

Cf. A068882.

Extensions

Corrected and extended by Sean A. Irvine, Mar 22 2024
Showing 1-7 of 7 results.