login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A297644 Pentagonal numbers (A000326) in which parity of digits alternates. 4
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

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

LINKS

Robert Israel, Table of n, a(n) for n = 1..2000

EXAMPLE

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

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

PROG

(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))

CROSSREFS

Cf. A297645, A297646, A297647.

Cf. A000326, A030141, A030152, A030160, A068882.

Sequence in context: A009413 A009429 A207821 * A242043 A156236 A209481

Adjacent sequences:  A297641 A297642 A297643 * A297645 A297646 A297647

KEYWORD

nonn,base

AUTHOR

Colin Barker, Jan 02 2018

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 17 17:47 EST 2022. Contains 350402 sequences. (Running on oeis4.)