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!)
A326821 a(n) is the number of positive numbers k < n such that n+k and n-k have no digit in common. 1
0, 1, 2, 3, 4, 4, 4, 5, 6, 7, 6, 7, 6, 6, 7, 8, 9, 11, 12, 13, 14, 13, 13, 13, 13, 14, 16, 17, 19, 20, 19, 20, 20, 19, 20, 22, 22, 24, 25, 26, 26, 27, 26, 27, 26, 28, 29, 31, 32, 32, 32, 31, 32, 32, 35, 33, 33, 32, 32, 32, 31, 30, 30, 30, 31, 36, 34, 35, 36 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
EXAMPLE
For n = 7, the pairs (sum, difference) for k = 1..6 are (8, 6), (9, 5), (10, 4), (11, 3), (12, 2), (13, 1). The last two pairs are not allowed so a(7) = 4.
PROG
(PARI) ok(a, b)=length(setintersect(Set(digits(a+b)), Set(digits(a-b))))==0;
count(n)={c=0; for(k=1, n-1, if(ok(n, k), c++)); c};
a(limit)=vector(limit, n, count(n));
CROSSREFS
Sequence in context: A006158 A340203 A135414 * A356992 A099479 A120508
KEYWORD
nonn,base
AUTHOR
Lars Blomberg, Oct 20 2019
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 23:26 EDT 2024. Contains 371917 sequences. (Running on oeis4.)