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!)
A081227 a(n) is the number of digits in common between n and the n-th prime in base 10. 2
0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,73

COMMENTS

Duplicate digits are ignored for comparison purposes; e.g. 1002 and 3050 only have one digit in common, 0.

LINKS

Table of n, a(n) for n=1..105.

EXAMPLE

a(7)=1 since the 7th prime is 17.

MAPLE

digcomp := proc(A, B) local a, b, crit, f; description "returns the digits that 'A' and 'B' have in common; if a third argument is given and it is 'sum' then the sum of the common digits is returned, else if it is 'num' then the number of common digits is returned."; if nargs>2 then crit := args[3] else crit := NULL fi; a := convert(`if`(A=0, [0], (convert(A, base, 10))), set); b := convert(`if`(B=0, [0], (convert(B, base, 10))), set); f := a intersect b; if crit=sum then return `if`(nops(f)>0, `+`(op(f)), -1) elif crit=num then return nops(f) else return f; fi; end proc;

CROSSREFS

Cf. A081228, A081229.

Sequence in context: A092410 A100204 A073779 * A301469 A004610 A068934

Adjacent sequences:  A081224 A081225 A081226 * A081228 A081229 A081230

KEYWORD

base,easy,nonn

AUTHOR

Francois Jooste (pin(AT)myway.com), Mar 11 2003

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 29 02:06 EST 2022. Contains 350670 sequences. (Running on oeis4.)